I have Autoscale deployment why does my app stop working when the browser closes

That’s not the case, deployments will continue working regardless, what kind of deployment are you using?

Typically, when folks tell me their bot stops working even though it’s deployed, their application is still leveraging the development URL somewhere. You need to make sure all parts of your program are updated to the production URL.

See this thread for an example: