SmartDisconnect is a fabric mod for Minecraft that allows you to have a little confirmation when leaving as in, if you try leaving nothing happens until you tick the checkbox, as that's the only "method" for now.
Latest Version
e5ebf22e304e0a29bb3bab9230da68dc8eb9693017363e652a1a3fe94f82b25c
Let's say you were in an event—one were you couldn't just leave and join back, and you alt tab on to let's say discord, when you alt tab back and click there's a chance that you accidentally click disconnect, this can even happening when going into the escape menu if you are too "fast"; basically this solves that unless you really mess up and somehow click the tick box and press disconnect. That's all.
If you want to request a feature or found a bug, please report it in Issues