Repository: godotengine/godot (language: cpp)

Issue:
Unable to rename a project after quitting to project list
### Tested versions

v4.4.beta2.official [a013481b0]
v4.4.beta1.official [d33da79d3]

### System information

Windows 11 - Godot v4.4.beta2

### Issue description

After quitting to the project list, it is not possible to rename the project we have just quit from.

### Steps to reproduce

1. Open any project
2. Quit to Project List (through the `Project` menu or the shortcut `Ctrl+Shift+Q`)
3. Select the project you just quit from and click on `Rename`
4. Note that you won't be able to rename the project and the following message is shown in red:
```
Creating a project at the engine's working directory or executable directory is not allowed, as it would prevent the project manager from starting.
```


### Minimal reproduction project (MRP)

Can be reproduced with any project.


Discussion / hints:
It seems to have something to do with #101890, as it seems that underneath it all, the last closed project is still open.
Is a regression between 4.4 dev 3 and 4.4 dev 4, bisecting rn.
Bisected to #94880, @KoBeWi

![Image](https://github.com/user-attachments/assets/19d2c46a-aae4-43a2-8a00-be197827d9f4)

Fix patch:
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 778257b3930a..eb0422211a00 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -2074,6 +2074,13 @@ void EditorNode::restart_editor(bool p_goto_project_manager) {
 
 	if (p_goto_project_manager) {
 		args.push_back("--project-manager");
+
+		// Setup working directory.
+		const String exec_dir = OS::get_singleton()->get_executable_path().get_base_dir();
+		if (!exec_dir.is_empty()) {
+			args.push_back("--path");
+			args.push_back(exec_dir);
+		}
 	} else {
 		args.push_back("--path");
 		args.push_back(ProjectSettings::get_singleton()->get_resource_path());


Test patch: