Hi Arna,
Greetings from ShepHertz!!!!
You can't prevent players who are leaving due to inactiveness or disconnection. But you can make prevention on leaveRoom API in your game.
Whenever such kind of situations arrives, remaining can also leave the Room and can join some other where is alraedy a player after waiting some time.
Let me know if it helps.
Thanks
Vishnu Garg
AppWarp Team