Admittedly this kinda changes what the mod is/does, but I think a much better (though harder to implement) way to solve the issue of accidentally closing the lobby is to instead have a confirmation box appear with a simple yes/no buttons, as removing the button completely means you then don't have any way to go back to the main menu with the UI.