The problem might be with your keyboard. To verify this, connect another keyboard and observe the results. If the problem disappears, it might mean your keyboard is faulty or that its Caps Lock key ...
I've used Gboard for years, yet I kept making the same frustrating typing mistakes. I'd accidentally tap the wrong keys, waste time switching to the numbers row, and constantly go back to fix words.