### 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;
	}
	if (!p_layout->has_section(p_section) || !p_layout->has_section_key(p_section, "open_scenes")) {
		return;
	}
	restoring_scenes = true;
	Array scenes = p_layout->get_value(p_section, "open_scenes");
	for (int i = 0; i < scenes.size(); i++) {
		load_scene(scenes[i]);
	}
	save_layout();
	restoring_scenes = false;
}
bool EditorNode::has_scenes_in_session() {