I was addressing
The problem is, once the server disconnects randomly, another peer becomes the host I believe. So when I try to reconnect to that room as the host it can't.
Peers don't automatically become hosts in an existing rooms if the host disconnects, unless you have them do so.
There are a million possible reasons you could lose connection over long periods of time, and not all of them are under your control. Best way to proceed is to plan how to manage if and when it does happen.
Since you also mentioned you did some testing with different browsers, if it's consistently reproducible, submit a bug report. And use the workaround you've discovered in the meantime, if you suspect that it will make a difference.