Thanks for replying, and it's interesting you should ask that, because I had in fact meant to mention that as part of my troubleshooting attempts already I had considered the role the keyboard might be playing, and tried another keyboard.
I use Gboard, which of course is Google's own keyboard...