Whenever i open a crafting menu or my inventory while my shaders are enabled my frames go down to what looks like 5-10 fps to the eye, i don't have this problem when I'm not using shaders so its definitely something to do with the shaders, I'm on a pretty decent PC too and i average 400 fps with shaders on medium.
when the lag occurs my frames don't go down while i have the F3 menu open and my ping doesn't go up either, like its some sort of visual bug that makes the game look like I've got terrible frames whenever my menu is open, as i said before this does not happen when i have shaders turned off and also doesn't just happen when i click on things in my inventory, even my mouse moves at what looks like 5 fps when in my menu i can see I'm having like 400-500 fps.
I've looked through reddit forums and searched the internet for people who have the same problem as me but I've not been able to find a single solution.
(sorry if my grammar or if I have made any incorrect spellings I'm really dyslexic)