The "Away" mode works only if you do not have negative earnings, else it will show a screen "workers are not happy" and such.
Games exported to Web from Godot are paused when tab is not focused, I am not sure that a workaround exists for this.
Viewing post in [Resource Gathering While Away] Possible Bug
Ah, yes. That makes sense.
I can think of a way to get around the pausing:
Every tick is a set number of seconds (5, at the start of the game), and there's already a system in place that tracks how long "Away" mode was active
So, when "Away" mode is deactivated, temporarily set the tick length as low as it will go (most likely a single frame) for as many ticks as it was active before resuming play.
This should allow things to scale in the same manner as if "Away" mode was never activated, because all of the math happens while it *isn't* active very very quickly.