### 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
_reset_play_buttons();
	ED_SHORTCUT_AND_COMMAND("editor/run_specific_scene", TTR("Run Specific Scene"), KeyModifierMask::CTRL | KeyModifierMask::SHIFT | Key::F5);
	ED_SHORTCUT_OVERRIDE("editor/run_specific_scene", "macos", KeyModifierMask::META | KeyModifierMask::SHIFT | Key::R);
	play_custom_scene_button->set_shortcut(ED_GET_SHORTCUT("editor/run_specific_scene"));
	write_movie_panel = memnew(PanelContainer);
	write_movie_panel->add_theme_style_override("panel", gui_base->get_theme_stylebox(SNAME("MovieWriterButtonNormal"), SNAME("EditorStyles")));
	launch_pad_hb->add_child(write_movie_panel);
	write_movie_button = memnew(Button);
	write_movie_button->set_flat(true);
	write_movie_button->set_toggle_mode(true);
	write_movie_panel->add_child(write_movie_button);
	write_movie_button->set_pressed(false);
	write_movie_button->set_icon(gui_base->get_theme_icon(SNAME("MainMovieWrite"), SNAME("EditorIcons")));
	write_movie_button->set_focus_mode(Control::FOCUS_NONE);
	write_movie_button->connect("toggled", callable_mp(this, &EditorNode::_write_movie_toggled));
	write_movie_button->set_tooltip_text(TTR("Enable Movie Maker mode.\nThe project will run at stable FPS and the visual and audio output will be recorded to a video file."));
	
	write_movie_button->add_theme_color_override("icon_normal_color", Color(1, 1, 1, 0.7));
	write_movie_button->add_theme_color_override("icon_pressed_color", Color(0, 0, 0, 0.84));
	write_movie_button->add_theme_color_override("icon_hover_color", Color(1, 1, 1, 0.9));
	HBoxContainer *right_menu_hb = memnew(HBoxContainer);
	menu_hb->add_child(right_menu_hb);
	renderer = memnew(OptionButton);
	renderer->set_visible(true);
	renderer->set_flat(true);
	renderer->set_fit_to_longest_item(false);
	renderer->set_focus_mode(Control::FOCUS_NONE);
	renderer->connect("item_selected", callable_mp(this, &EditorNode::_renderer_selected));
	renderer->add_theme_font_override("font", gui_base->get_theme_font(SNAME("bold"), SNAME("EditorFonts")));
	renderer->add_theme_font_size_override("font_size", gui_base->get_theme_font_size(SNAME("bold_size"), SNAME("EditorFonts")));