Wifi network selection window won't close
You can use UIElementInspector (more info here) to find out a lot of behind-the-scenes stuff for individual windows or other elements of the macOS user interface.

This shows that the dialog you are referring to is part of SystemUIServer. You can simply Quit (no need to Force Quit) the SystemUIServer process using Activity Monitor.app and it will automatically restart thanks to launchd.

SystemUIServer is responsible for the right side of the menu bar (menu extras/menulings) and a few other things. See this archived page for more info.