Here’s something that might work, I’ve not tested it.
If you can start the app in reach of the server and keep the required offline data entry all client side, then the app might well continue to run without any server connection.
You could then wrap a server “ping” on a timer inside a try block to see if the server is back in reach, and you could then sync.
You may have to set the default error handler to trap any attempts the anvil client might make to contact the server itself (the docs will help you with that).
Just an idle thought.