If you are using HDMI or DisplayPort for audio, the devices regularly seem to switch back to in-built audio all by themselves.
This can be due to the HDMI device becoming unavailable when the monitor turns itself off, causing PulseAudio to choose a different device. This causes a problem as PulseAudio does not automatically go back to the originally selected device once the HDMI device has returned.
This is very frustrating as it means constantly having to re-selected the prefered device.
To resolve this problem it is possible to disable automative port switching.
To do this follow the instructions below:
Edit the following file:
Find and comment out the following line:
Now restart PulseAudio
This fix was applied on Pop_OS! however, should work with a variety of distros.