### 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
int next_tab = editor_data.get_edited_scene() + 1;
				next_tab %= editor_data.get_edited_scene_count();
				_scene_tab_closed(next_tab, current_menu_option);
			} else {
				if (current_menu_option != FILE_CLOSE_ALL) {
					current_menu_option = -1;
				} else {
					_scene_tab_closed(editor_data.get_edited_scene());
				}
			}
			if (p_confirmed) {
				_menu_option_confirm(SCENE_TAB_CLOSE, true);
			}
		} break;
		case FILE_CLOSE: {
			_scene_tab_closed(editor_data.get_edited_scene());
		} break;
		case FILE_CLOSE_ALL_AND_QUIT:
		case FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER:
		case FILE_CLOSE_ALL_AND_RELOAD_CURRENT_PROJECT: {
			if (!p_confirmed) {
				tab_closing_idx = _next_unsaved_scene(false);
				if (tab_closing_idx == -1) {
					tab_closing_idx = -2; 
				} else {
					_scene_tab_changed(tab_closing_idx);
				}
				if (unsaved_cache || p_option == FILE_CLOSE_ALL_AND_QUIT || p_option == FILE_CLOSE_ALL_AND_RUN_PROJECT_MANAGER || p_option == FILE_CLOSE_ALL_AND_RELOAD_CURRENT_PROJECT) {
					if (tab_closing_idx == -2) {
						if (p_option == FILE_CLOSE_ALL_AND_RELOAD_CURRENT_PROJECT) {