Brave browser youtube glitch

A few days ago I noticed that there was a glitch on brave where if I alternate between youtube tab and another tab(or do anything on youtube including scrolling through the comments and clicking on videos), the whole screen would turn black sometimes. The PC would stay on and the only way I found how to fix this is to click onto another tab and the screen would come back again. I tried this on other browsers and the problem didn’t occur. I also tried this on other websites and the only website where this happens is youtube