Player uncrouches/unsneaks when in a separate UI from the main game, but then re-crouches/re-sneaks when exiting the menu, even though sneak is set to toggle. This can lead to the player taking unexpected damage (e.g. on magma blocks) or falling off a block unexpectedly (e.g. building a roof on a building).
Steps to Reproduce:
Have Sneak toggled on
Crouch when in normal game mode
Enter a different UI (Player Inventory, Villager Trading UI, etc.)
Expected Result:
Player remains crouched while in the UI
Actual Result:
Player uncrouches while in the UI menu and then resumes crouching when exiting the menu
Duplicate of MC-301806