The RPi 5 SoC does not have VP9 hardware decoding which is necessary for YouTube videos. Anything above 1080p30 inside a window will suck.
Weird part is that RPi4 SoC has it.
Edit: confirmed by Raspberry Pi Foundation themselves, only hardware video decoder is HEVC.
Version 0.27.2 is working fine at this moment.