I have had this same issue manifest in a few ways:
On my farm, all of a single type of animal will freeze. You will still HEAR them, and see grass get eaten (where no animal is). You cannot interact.
-This has seemed to cause my animals to disappear and load outside my farm as well and animals to die because they fall or get stuck in something (bushes)
*I have found the only way to stop this is to save and quite and reload.
-When I am in caves, I will HEAR mobs, but not SEE them. They will mob up and attack me but I cannot retaliate. As I speed run OUT of the cave, I will find a collection of their 'soulless bodies' standing around frozen. THIS is most aggravating as I can't even retaliate.
same problem in 1.16.1
but I found that onClick event can be triggered when I set is_showing_menu = true
Still not working