Sound output device is changing source

Hello everyone, I have this weird bug (?)

I am using my heasdset which is connected to my pc. I was watching a video and I noticed a spike in the sound, when checking the output device I noticed that it changes for a fraction of a second from 'Line out - Built-in audio' to 'Headphones - Built-in audio'. It's on video (link).
What can I do in this situation? I have it also with Windows and I have no problem, also when I change the sound source to my monitor this bug won't happen