How to prevent players from leaving the game?

I am working on a project, but in order for it to function, I need to make it so if my account tries to leave, it prevents it. This is exclusively for the group of people I add (with permission).

It’s going to be on display, so someone could easily exit the game and make us have to rejoin and re-enter the password (which wouldn’t be ideal). So there are no malicious intents; just want to protect it since it is on display.

How could I go about doing this, and if it’s not possible, should I add a system to notify the other accounts active if it disconnects?

I don’t think you can stop people from disconnecting. You can figure out that they left, though. This doesn’t help though if for your purposes going AFK is as bad as disconnecting

No, people will be using it, but I don’t want them to easily be able to leave and make me have to fix it. I will try the ‘figure out that they left’ part. Thank you!

Pretty sure this is very impossible.