### 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.
DisplayServer::get_singleton()->clipboard_set(warning->get_text());
}
void EditorNode::_dock_floating_close_request(WindowWrapper *p_wrapper) {
	int dock_slot_num = p_wrapper->get_meta("dock_slot");
	int dock_slot_index = p_wrapper->get_meta("dock_index");
	
	Control *dock = p_wrapper->release_wrapped_control();
	dock_slot[dock_slot_num]->add_child(dock);
	dock_slot[dock_slot_num]->move_child(dock, MIN(dock_slot_index, dock_slot[dock_slot_num]->get_tab_count()));
	dock_slot[dock_slot_num]->set_current_tab(dock_slot_index);
	floating_docks.erase(p_wrapper);
	p_wrapper->queue_free();
	_update_dock_containers();
	_edit_current();
}
void EditorNode::_dock_make_selected_float() {
	Control *dock = dock_slot[dock_popup_selected_idx]->get_current_tab_control();
	_dock_make_float(dock, dock_popup_selected_idx);
	dock_select_popup->hide();
	_edit_current();
}
void EditorNode::_dock_make_float(Control *p_dock, int p_slot_index, bool p_show_window) {