I've been getting this, too…
It's a serious issue, as I spend a lot of time in vi and the terminal.
I found a Termux setting that
may help. Edit the file
.termux/termux.properties, and add/uncomment the line:
enforce-char-based-input = true
Then restart Termux, or run ‘
termux-reload-settings’ so the setting takes effect.
I
think that has made an improvement, though I suspect it's not completely fixed. Let me know what you think!