If you stand still and hold E (to open up inventory) the inventory menu starts flashing on the players screen and may be a health risk to people with epilepsy or similar health problems.
(attachment is a in-game recording)
Linked issues
duplicates 1
Attachments
Comments 2
Won't Fix, sorry. See MC-93437.
If this is a current problem for you, changing to Tab might help. There is a reported bug that Tab open inventory fails to close inventory, and so long as that isn't fixed it might be exactly what you need.