### Godot version

v4.1.rc3.official [cdd2313ba]

### System information

Godot v4.1.rc3 - Windows 10.0.19045 - Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz (8 Threads)

### Issue description

Trying to open the filters (file types) menu in a non-exclusive FileDialog makes it automatically close and brings up the following error in the console/debugger:
```
ERROR: Condition "!windows.has(p_window)" is true. Returning: Rect2i()
   at: window_get_popup_safe_rect (platform/windows/display_server_windows.cpp:2426)
```
This seems to have been broken somewhere between 4.1 beta 2 and beta 3.

### Steps to reproduce

- Create a FileDialog
- Untick the "Exclusive" box
- Make it visible / pop it up / etc
- Try opening the `All Files (*)` menu

### Minimal reproduction project

[dialog_test.zip](https://github.com/godotengine/godot/files/11955537/dialog_test.zip)

Window::_update_theme_item_cache();
	theme_cache.panel_style = get_theme_stylebox(SNAME("panel"));
	theme_cache.buttons_separation = get_theme_constant(SNAME("buttons_separation"));
}
void AcceptDialog::_notification(int p_what) {
	switch (p_what) {
		case NOTIFICATION_POST_ENTER_TREE: {
			if (is_visible()) {
				get_ok_button()->grab_focus();
			}
		} break;
		case NOTIFICATION_VISIBILITY_CHANGED: {
			if (is_visible()) {
				if (get_ok_button()->is_inside_tree()) {
					get_ok_button()->grab_focus();
				}
				_update_child_rects();
			}
		} break;
		case NOTIFICATION_THEME_CHANGED: {
			bg_panel->add_theme_style_override("panel", theme_cache.panel_style);
			child_controls_changed();
			if (is_visible()) {
				_update_child_rects();
			}
		} break;
		case NOTIFICATION_WM_WINDOW_FOCUS_OUT: {