I have the exact same problem, I have absurd lag spikes, I go from having 400 fps to 50 and then they go back up randomly. I can't figure out if it's my computer or minecraft itself. I have an rtx 2060 with the latest updated drivers, windows is updated to the latest version, my ssd has 105 gb free. and I have 32gb of ram, as another user said. The problem seems to be fixed only if you completely restart minecraft and the launcher. In addition, if I change the ram allocation space it fixes, but turning the pc off and on again brings it back to the same conditions,
I'm having the exact same problem. Thanks to you, I figured out what was wrong with this version. Playing version 26.2, I had the same problems as you. Unstable frame drops that made the game run like crap. Initially, I thought it was a version-specific issue, since going back to version 26.1.2, these issues weren't there, but instead. I changed to Vulkan and the game now runs very smoothly. The only flaw is that I can't use shaders with iris and sodium if Vulkan is used. I hope they fix it.
And I tell you, it happened to me, even though I have these specs:
Rtx 2060.
I7 9700F.
32GB RAM
Windows 11 25H2.
And I have everything up to date.