### 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)

class AcceptDialog : public Window {
	GDCLASS(AcceptDialog, Window);
	Panel *bg_panel = nullptr;
	Label *message_label = nullptr;
	HBoxContainer *buttons_hbox = nullptr;
	Button *ok_button = nullptr;
	bool hide_on_ok = true;
	bool close_on_escape = true;
	struct ThemeCache {
		Ref<StyleBox> panel_style;
		int buttons_separation = 0;
	} theme_cache;
	void _custom_action(const String &p_action);
	void _update_child_rects();
	static bool swap_cancel_ok;
	void _input_from_window(const Ref<InputEvent> &p_event);
protected:
	virtual Size2 _get_contents_minimum_size() const override;
	virtual void _update_theme_item_cache() override;
	void _notification(int p_what);
	static void _bind_methods();
	virtual void ok_pressed() {}