This still happens for me on 1.19.50. When playing on a world local to my device (i.e. not online), switching to another app, then back to Minecraft, seems to fix the issue, at least until you use another text field. However, when playing on Realms that does not fix the problem, and I have to completely kill the app and rejoin my Realm to fix the issue. I don't play with touch screen controls at all, so it makes gameplay really painful on Realms.
This still happens for me on 1.19.50. When playing on a world local to my device (i.e. not online), switching to another app, then back to Minecraft, seems to fix the issue, at least until you use another text field. However, when playing on Realms that does not fix the problem, and I have to completely kill the app and rejoin my Realm to fix the issue. I don't play with touch screen controls at all, so it makes gameplay really painful on Realms.