They have to be selected before the keyboard command will work, sometimes they are just in the background... in your image it's selected. I think. Can't check as I'm on XP 😡
COMMAND-W doesn't close these type of Windows, so the command that opens it, usually closes it too.
A bit strange IMHO. Letting COMMAND-W close any active Window is the "consistent" way.