### Godot version

Godot 4 beta 12

### System information

Windows 10

### Issue description

![tttttt](https://user-images.githubusercontent.com/43501741/212407759-2e3cfa93-c9c1-4224-a118-2d236b0c5318.png)


### Steps to reproduce

Run a project in Godot 4 beta 12

### Minimal reproduction project

N/A
case FILE_CLOSE_ALL: {
			if (editor_data.get_edited_scene_count() > 1 && (current_menu_option != FILE_CLOSE_RIGHT || editor_data.get_edited_scene() < editor_data.get_edited_scene_count() - 1)) {
				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) {