Default audio output device changes when screen locks

My default audio output device changes when the screen locks. I prefer to use the speakers in my monitor (connected to nvidia card), but after screen lock, the system switches to onboard audio and headphones. Sometimes I need to restart pipewire to get Monitor audio working again. Any tips? I would be happy to provide more information if needed.