AFAIK there isn't anything we can do about games not running while unfocused, its a browser/device thing.
Some things I would try include simply increasing time before kicking, adding an "idle" state if no response received for x time before booting, or automatic reconnectingand updating when focused again. Or you can simply not show the current status of who is online or not.
Check for javascript solutions too, since you can run scripts directly. Although I imagine scripts running in the background is exactly the kind of thing browsers and mobile devices are actively trying to prevent from happening.