@Serpens66 said:
that was not what I asked
Ah, I see that now. It was my misunderstanding that you were trying to press the Close toolbar button but were hitting the Close All toolbar button instead. Sorry for that, I guess I read your original posting too quickly.
But, really, if you are going to accidentally hit a toolbar button rather than a file-buffer’s tab (something I have never accidentally done), then perhaps you should simply turn the toolbar OFF as it sounds like you are in peril of accidentally activating ANY toolbar function and not only the Close All one. Turning off the toolbar can be done in the preferences.