When I type it seems fine but when I backspace or move the cursor sometimes random word get deleted or my cursor jumps to the beginning of the line.
I think the problem relies on your keyboard app.
I believe this is an issue with both openboard and the aosp keyboard (with jerboa specifically), here lemme find the repo for the open board fork thats still getting development
Edit: https://github.com/Helium314/openboard this fork is under active development. It can be installed via the apks on github or through obtainium. If there isn’t one already it would be helpful to submit a bug report for the issue you’re experiencing. It might be good to open a bug report with jerboa too