### 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
Ref<EditorSceneFormatImporterESCN> import_escn;
			import_escn.instantiate();
			ResourceImporterScene::add_importer(import_escn);
		}
		Ref<ResourceImporterBitMap> import_bitmap;
		import_bitmap.instantiate();
		ResourceFormatImporter::get_singleton()->add_importer(import_bitmap);
	}
	{
		Ref<EditorInspectorDefaultPlugin> eidp;
		eidp.instantiate();
		EditorInspector::add_inspector_plugin(eidp);
		Ref<EditorInspectorRootMotionPlugin> rmp;
		rmp.instantiate();
		EditorInspector::add_inspector_plugin(rmp);
		Ref<EditorInspectorVisualShaderModePlugin> smp;
		smp.instantiate();
		EditorInspector::add_inspector_plugin(smp);
	}
	editor_selection = memnew(EditorSelection);
	EditorFileSystem *efs = memnew(EditorFileSystem);
	add_child(efs);
	
	FileDialog::get_icon_func = _file_dialog_get_icon;
	FileDialog::register_func = _file_dialog_register;
	FileDialog::unregister_func = _file_dialog_unregister;
	EditorFileDialog::get_icon_func = _file_dialog_get_icon;
	EditorFileDialog::register_func = _editor_file_dialog_register;
	EditorFileDialog::unregister_func = _editor_file_dialog_unregister;
	editor_export = memnew(EditorExport);