Videos stutter on unfocused monitor
I just bought new PC and switched to win11(never happened on win10). Videos stutter when on 2nd monitor and game is open on first, but audio doesn't. Problem goes away immediately when clicking to the firefox window. Happens on both youtube and twitch, but not on Nebula.tv and not on chrome. Doesn't happen if the video is 480p, but does on 720 and 1080 and both of them are 60fps which might be something. Also doesn't happen if the game is windowed, but does on fullscreen and borderless.
I've disabled hardware acceleration (in windows and browser). I've tried setting both monitors to 60hz, setting firefox priority to high (and game to low), disabling effiency mode, setting power mode to performance and tried a lot of other things including about:config settings. Also ruled out extensions.
CPU: AMD Ryzen 7 9700X GPU: RTX5070 1st monitor: 180hz 2nd: 80hz