### 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
EditorProgress save("save", TTR("Saving Scene"), 4);
	if (editor_data.get_edited_scene_root() != nullptr) {
		save.step(TTR("Analyzing"), 0);
		int c2d = 0;
		int c3d = 0;
		_find_node_types(editor_data.get_edited_scene_root(), c2d, c3d);
		save.step(TTR("Creating Thumbnail"), 1);
		
		Ref<Image> img;
		
		
		
		if (c3d == 0 && c2d == 0) {
			img.instantiate();
			img->initialize_data(1, 1, false, Image::FORMAT_RGB8);
		} else if (c3d < c2d) {
			Ref<ViewportTexture> viewport_texture = scene_root->get_texture();
			if (viewport_texture->get_width() > 0 && viewport_texture->get_height() > 0) {
				img = viewport_texture->get_image();