I don't think this is working as intended, since Java got updated in 1.16 to make the keep inventory toggle not be a cheat.
I changed my gfx_vsync, and it fixed it for a few weeks, then for some reason I don't know, it stopped working again. I used @Noah Robinson's idea of setting the gfx_max_framerate and that worked (I actually set it to a bit higher (70) than my monitor's refresh rate (60) because it was too choppy, but if I raise it too high I notice lag again).
Why on earth is this "won't fix"? This is a pretty significant (and annoying) bug, especially since OP said that they could DUP stuff!