You need to do two things:
Go to "Tools" → "Options" → "Environment" → "General" and uncheck the "Close" button for the active tool window only.
Now go to Tools -> Options -> Environment -> Keyboard and attach a shortcut to the Window.Hide command (I bound mine to CTRL + ALT + ESC when testing, but it's a little cumbersome).
What is it. Now that you are any tool window and press the shortcut key for Window.Hide, it will close all the windows in this group of tabs.
WARNING: Like everything else, it's good and bad. Now that the Close button only affects the active toolbox window, it closes all tool windows that are grouped regardless of where you are, so keep in mind how you group tool windows.
source share