This seems like the classic bug on GrapheneOS's default keyboard, which I believe is a very old version of GBoard.
You can see how the keyboard's auto-correction considers the space part of the word in this frame. This is an issue that happens on any app that uses the new Jetpack Compose UI elements. :(
Since this is so old, I am not sure when it will be fixed by the keyboard providers.
