We use Gadget for backend of a theme app extension.
We deploy the front end and backend separately with 2 separate commands. This causes the issue that for a very brief period of time, the codebases are not aligned.
How are other folks solving this problem successfully?