I don't know if I'm the only one experiencing this but in Android 14 when the app I'm working on is sent to the background the debugger will disconnect after a few seconds. Or maybe android kills the app?
Sounds like your the OS kills the app. Check the settings under "developer options" related to apps running in the background. Maybe you can make it less aggressive. 30 seconds is indeed short period.
In debug mode the app closes when the network connection is broken. I guess that your device stops the connection for some reason. Create a new B4XPages project and run it in debug mode. Does it also happen?