Been dealing with this issue as of late with my MacOS terminal (running MacOS Monterey version 12.4). Have no idea when it started, or why.
Looks something like this:
The easiest fix I have seen, that seems to do the trick is to use the “reset” command:
It doesn’t hurt to kill your terminal instances.
Have no idea why it started, but I’m glad it’s gone. Was causing issues with passwords.
Thanks, hope it helps.