It kind of depends on what you are trying to achieve.
From what your saying, that autojoin doesnt work when trying to reconnect, has likely to do with events for disconnecting, reconnecting and joining are happening too fast, but without the events involved its hard to say whats happening.
I solved some issues with similair situations, where the host disconnects, and migrates to one of the peers, having the old host reconnect as a peer, preserving game state. This involves keeping track of the Peer IDs assigned, and remembered, same goes for the room name ofc.