### Godot version

4.1.beta (7b1387ff2)

### System information

Mageia 9, Linux

### Issue description

When opening an empty project in latest `master`, I get these errors:
```
ERROR: Index p_idx = -1 is out of bounds (edited_scene.size() = 1).
   at: get_scene_path (editor/scu/../editor_data.cpp:880)
ERROR: Index p_idx = -1 is out of bounds (edited_scene.size() = 1).
   at: check_and_update_scene (editor/scu/../editor_data.cpp:683)
ERROR: Index p_idx = -1 is out of bounds (edited_scene.size() = 1).
   at: set_edited_scene (editor/scu/../editor_data.cpp:745)
```

Possibly related to recent changes to restore past sessions, but there's nothing to restore in this case?

### Steps to reproduce

- Create a new project, edit it
- Quit to project manager
- Re-open the newly created project -> errors

### Minimal reproduction project

Empty project.
path = path.substr(6);
				}
				path = path.get_basename();
				
				scene_name = scene_name.trim_suffix("/");
				path = path.trim_suffix("/");
				
				
				
				can_proceed = can_proceed || (path.size() - scene_name.size()) >= 1;
				E = E->next();
				if (to_erase) {
					iset.erase(to_erase);
				}
			}
			if (!can_proceed) {
				break;
			}
		}
	}
}
void EditorNode::_update_scene_tabs() {
	bool show_rb = EDITOR_GET("interface/scene_tabs/show_script_button");
	if (DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_GLOBAL_MENU)) {
		DisplayServer::get_singleton()->global_menu_clear("_dock");
	}
	
	Vector<String> disambiguated_scene_names;
	Vector<String> full_path_names;
	for (int i = 0; i < editor_data.get_edited_scene_count(); i++) {