Regardless, use a youtube to mp3 converter instead. I meant it will impact it drastically on low spec machines, but on all PCs running video in the background can be very intensive sometimes. You might experience stuttering or frame rate drops.
this happened after I got the windows 10 anniversary update, version 1607. I updated to play forza horizon 3.
Trust me here, just using MP3s will solve this problem easily, nothing more to it.
Could try set the browser's affinity that's running youtube to the least busiest core or two. Would have to monitor the game's cpu usage to see if there are any slack cores. Not sure if it would make any difference never tried it.
Don't go on YouTube while Gaming. Like Chugalug_ said, just use MP3s. If you don't have any, just open the Media Player on Windows (if you're using it) and listen while playing. Steam also has a music player too which let's you listen to music while playing.
Have you tried running the game windowed while listening to youtube?