... after typing shift+command+4 to enter screen capture mode, hit the space bar ... then click on the window you want.
It's more convoluted than it should be (and it actually used to be simpler), but it's still possible to get just the window that you want.

































