you stop crouching if its toggled when inventory is open or game is paused, or even ‘pause’ screen is open on a server. it could make players die when building high or in hardcore at tense moments. im unsure if its a glitch or intended game change however its caused issues when playing.
Thank you for your report! This is a duplicate of MC-301806, Works As Intended.