Offline automation may be a thing game dev can address, crossing fingers on that one.
Tabs going inactive is a common issue for most browsers, game dev cannot fix this, only the browser dev can.
Best option I found is to separate it into a new window and instead of minimising it, drag it into a corner somewhere and change focus.
Remaining problems are: Memory leakage and forgetting it is still running when closing the normal browser window.
