Fixed-ish. Usimg Gboard on my phone and Samsung Keyboard on my tablet. Makes no sense, my OCD of not having them be the same is killing me but i can post.
So something with the Samsung Keyboard?
Try clearing it's data. Clear system cache.
Try rolling it back to factory version or updating it. Generally the factory load version is the most stable. Another Samsung system app could be causing it but no idea which to look at.
When it started is a big clue. Were any apps iupdated, OS upgrade, new apps installed near that time?
Poorly written 3rd party app will sometimes change user hidden settings which will persist even if uninstalled. It's rare but it happens.
Are any Samsung apks disabled or blocked especially system apks?
Could it be malware, sometimes the effects are subtle but Androids tend to be very stable so any glitches or instability should be investigated promptly. A factory reset on Android 9 or higher would rule out malware.
A interesting issue. If you're persistent you'll likely track it down... sometimes it takes a while.