This is least a bug then a feature that is in Bedrock and I think it should also be in Java.
So, when you’re in a world and hold "E", the inventory opens and closes really fast and it flashes. Sometimes it might feel "unprofessional" and I think it would be great if it was like in Bedrock.
(sorry for the loud music in the video)
This is already being tracked in MC-118107.