I would like to find a different solution to closing these windows without having to do the click and drag.
If you want to come back to the default windows setup you can click on the "+" tab on the top and choose General > Layout (or whatever setup you want to come back to). You can move or delete all this tabs with right click. If you want to save your own custom layout I think you need to create it and Save the Startup File.
Stop modifying the windows and use Layouts or Workspaces instead.
Press CtrlPage Up and CtrlPage Down to navigate to the next layout.
It is much faster, and you can set your own set of screens for specific tasks, and to suit your personal workflow, without modifying the interface at all or dragging windows everytime.
Start with an empty project. Use the plus sign at the top to create a new workspace.
Arrange the windows to the way you want to work.
Create as many layouts/workspaces as you want.
Once you've created your own layouts in an empty project, save the project as default (File > Defaults > Save Strartup File), and then your custom layouts will be available to you every time you open blender.
To open an existing project into your new layout use File > Open and disable the Load UI option, so that the file opens with your default User Interface and not the one saved on the file.
For more detail read the following link: