"on a raspberry pi 5 4gb"? That is insane, somehow I still got lag, or maybe it's just the controls.
I make everything on it, my games , flutter apps and even some machine learning stuff.
I am working on a custom Linux distro and I use it as I have optimised it for performance it is based on void Linux.