Some browsers automatically pause the game when it's not in focus, so you can't reliably keep a game running in the background anyway. This is especially important on mobile where users get very annoyed with any apps which continue to drain battery even when in the background. So I don't think this can be changed.
You can use the wallclocktime system expression to calculate how long the game was in the background for, but that's about it.