Same issue here with a 7a. It started a couple of weeks ago and even after wiping user and cache data it just now happened again.
Couple things I noticed:
It doesn't seem to be related to a specific app, I've seen it happen in Signal as well as the default SMS app.
I do have more than one keyboard languages installed between which I keep toggling, but there's no 3rd party board installed.
I did check RAM usage and the AOSP keyboard app appears to consume a lot of it at times. When it started happening and I checked it said that the keyboard had a peek usage of 1.7GB RAM. Don't know if that's normal, tho it does feel like a lot for a basic app. Recently it hasn't used that much RAM but it's still about 400MB max, which still feels a lot. As OP said it does feel like the app is crashing for some reason and then being restarted. Maybe memory related?
Just to be clear, not saying this is a Graphene issue, just looking for some advice or people who've run into the same annoying issue, which btw just happened again as I'm typing this.
I did create a log shortly after it happened earlier. If somebody would be interested in investigating that, let me know.