How to simply close a tab?
You cannot close a tab in the Arduino IDE.  If a file exists in the sketch then it is there with a tab. Deleting a tab deletes the file.

In the Arduino IDE a tab is a file and a file is a tab. You can't remove one without removing the other.

You might like to check out my IDE, UECIDE, which deals with tabs in a more traditional manner.