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

virtual void cancel_pressed() {}
	virtual void custom_action(const String &) {}
	
	void _text_submitted(const String &p_text);
	void _ok_pressed();
	void _cancel_pressed();
public:
	Label *get_label() { return message_label; }
	static void set_swap_cancel_ok(bool p_swap);
	void register_text_enter(Control *p_line_edit);
	Button *get_ok_button() { return ok_button; }
	Button *add_button(const String &p_text, bool p_right = false, const String &p_action = "");
	Button *add_cancel_button(const String &p_cancel = "");
	void remove_button(Control *p_button);
	void set_hide_on_ok(bool p_hide);
	bool get_hide_on_ok() const;
	void set_close_on_escape(bool p_enable);
	bool get_close_on_escape() const;
	void set_text(String p_text);
	String get_text() const;
	void set_autowrap(bool p_autowrap);
	bool has_autowrap();
	void set_ok_button_text(String p_ok_button_text);
	String get_ok_button_text() const;
	AcceptDialog();
	~AcceptDialog();
};
class ConfirmationDialog : public AcceptDialog {