It sounds like your computer is switching the default audio output from the HDMI to the DVI when you plug in the DVI cable. You can try changing the default audio output in Windows 11 to the HDMI port by following these steps:
1. Right-click on the speaker icon in the taskbar and select "Open Sound settings"
2. Under "Output", click on the dropdown menu and select the HDMI output
3. Test the audio by playing a video or audio file on the TV
If that doesn't work, you can try updating the graphics card driver or checking the audio settings in the graphics card control panel.