Are you using predictive text? I’m not sure because I don’t have Android, but this sounds very similar to this issue. I’d recommend reading these threads and seeing if any of the fixes or upgrades work for you:
On Samsung this is caused by Samsung keyboard predictive text function. Either disable it or use Gboard.
We are getting some external confirmation that this is indeed a Samsung problem and should addressed in One UI 5.1. Let us know if that’s true and what keyboard version you have.