After a recent update, I've noticed that working on any terminal for more than a few minutes causes a delay between inputting a keypress and seeing it reflected on the screen.
Specifically, if I were to type "Hello, World" I would see only "Hello, Worl" - but as soon as I press another key, the "d" appears and that new key becomes hidden instead. When I press yet another key, the previous one becomes visible, and so on.
Waiting somewhere between one and twenty seconds sometimes causes the keypress to appear, but that's not exactly conducive to work at any reasonable pace, especially since it also affects arrow keys and navigation.
I haven't noticed this behavior anywhere outside of a bash shell and anything running inside it (mostly vim). The computer's been restarted a few times, the CPU is not under load, and everything's up to date (Ubuntu 22.04.4 LTS, GNU bash 5.1.16(1)-release).
A similar question was asked about 2 years ago, but there was no conclusive answer.
How do I go about troubleshooting this behavior?