Developers who like to listen to music while working, recognize this scenario: Mediacontrols control apple music. Now, you need to look something up on youtube. A tutorial starts and you click the play/pause button to stop the music. But now the tutorial stops playing.
This is exactly the opposite of the intent. Transport keys on the keyboard should control the music, not youtube. Here is how to disable this behavior:
If a setting like Hardware Media Key Handling cannot be found, try this: