Vanilla Minecraft is known for being awful for FPS even outside of a browser. There's a reason most people use a whole slate of performance mods just to get actual decent performance.
(I've got a Ryzen 7 with a 3080 and it would frequently hover between 40-50fps even with graphics turned down. Install the performance mods and I can get >120fps with fancy graphics and shaders.)
This one: https://bugs.mojang.com/browse/MC/issues/MC-170134
I now never see below 60 fps when for all my years of playing this bug would bring down my FPS to the teens or 0 all the time no matter what hardware.
Good to know that they're finally considering performance fixes but obviously involves moving to 1.21.5 and until there's mods to disable the bits I don't like, I'll be sticking with 1.20+mods.