When you are done sleeping the game keeps the chat open, even if you haven't typed anything.
Linked issues
is duplicated by 1
Attachments
Comments 2
In my testing, the chat UI does not remain open if empty when waking up, therefore, making this "Works As Intended" due to the resolution of MC-160710.
This works as intended due to MC-160710, resolved as "Fixed" in 21w37a.
As for the "even if you haven't typed anything" part, I'm unable to reproduce that.
Reuploaded in survival mode and to disclose seed.