### Godot version

4.0 beta 13

### System information

macOS 13 Ventura, Macbook Pro 2019, 16-inch

### Issue description

In Godot 4, if a editor is expanded to a title bar, double clicking on any button in a title bar such as "Run Project" or "Stop Running Project" will result in minimizing or shrinking a Godot window. It is a small but quite annoying bug and it works in all Godot 4 betas I'v seen. 

### Steps to reproduce

Turn on "Expand to Title" in the Editor Settings/Interface/Editor, than double click on any button in the title area.

### Minimal reproduction project

N/A
if (!bool(EDITOR_GET("interface/scene_tabs/restore_scenes_on_load"))) {
		return false;
	}
	Ref<ConfigFile> config;
	config.instantiate();
	Error err = config->load(EditorPaths::get_singleton()->get_project_settings_dir().path_join("editor_layout.cfg"));
	if (err != OK) {
		return false;
	}
	if (!config->has_section("EditorNode") || !config->has_section_key("EditorNode", "open_scenes")) {
		return false;
	}
	Array scenes = config->get_value("EditorNode", "open_scenes");
	return !scenes.is_empty();
}
bool EditorNode::ensure_main_scene(bool p_from_native) {