Hello Blamsen,
Welcome to Apple Support Communities!
We want to help get your Mac selecting the correct audio source when a new one is connected.
This Apple Support page has the more details: If your Mac switches to a different audio device - Apple Support
Please check for any pending updates to the macOS, which can help make sure macOS is working as expected.
"Use Software Update to install updates and upgrades for macOS and its built-in apps, including Safari.
- Before continuing, it's a good idea to back up your Mac.
- From the Apple menu in the corner of your screen, choose System Preferences.
- Click Software Update in the System Preferences window. Can't find Software Update?
- Software Update now checks for new software.
- If Software Update finds new software, click Update Now or Upgrade Now to install. You might be asked to restart or enter an administrator password.
- If Software Update says that your Mac is up to date, then no new software is currently available for your Mac model."
Use these steps to check for updates: Update macOS on Mac - Apple Support
Once all updates are installed, restart the Mac with a normal restart and then test the issue again.
We hope this helps to quickly isolate and resolve the issue to get the Mac connecting to your audio source.
Cheers!