If you want to prevent to unintentionally close your apps from the sidebar, follow these steps:
1. click on your profile at the bottom of the sidebar
2. click on "Settings"
3. enable (or disable) the option "Disable Close button in the sidebar".
4. click on "Save changes"
That's it. You can always enable or disable this option.