So, I am not sure if this is a recurring problem, but it happens every time I trade with Cartographers in Survival. When I do the trade (Glass Panes for Emeralds) after the villager levels up due to the trading, all the entities freeze up, I am not able to enter any chests, workstations etc, and when I break blocks, the block doesn't pop up to be picked up, I cant take any damage. When I try to save and exit, it doesn't save and I have to force quit.
ย
Im not sure how to fix it, and it isnt lag because I have sat in one place for a while to see if it fixes itself and it doesn't. I haven't found any other problems with other villagers or trades yet.
Linked issues
Comments

See MC-228721.
try hitting any villagers or an entity near by, it should fix it. It worked for me ๐
Duplicate ofย MC-228721, which was later resolved as invalid due to this issue being caused by Optifine.
This report is invalid, you're using OptiFine, which is unsupported on the bug tracker, try reproducing the bug in an unmodded version of the game.