### Godot version

v4.0.beta10.official [d0398f62f]

### System information

Windows 11

### Issue description

Using a custom "Project Settings Override" file causes Godot to immediately modify main project file (`.godot`) on startup.

The attached project demonstrates this issue. The project has the following 3 things defined:

1. Window display mode is set to "Exclusive Fullscreen" (`window/size/mode=4`) in main project file.
2. Custom project override file is set to "res://override.cfg" (`config/project_settings_override`).
3. Inside "res://override.cfg" window display mode is set to "Windowed" (`window/size/mode=0`).

Opening this project will immediately modify main project file to have "Windowed" display mode (discarding original "Exclusive Fullscreen" setting).

### Steps to reproduce

1. Open example project.
2. Go to Project Settings -> Display -> Window -> Mode.
3. Expected option is "Exclusive Fullscreen", actual result is "Windowed".

### Minimal reproduction project

[override-issue.zip](https://github.com/godotengine/godot/files/10312624/override-issue.zip)

}
		}
	}
}
/*
 * This method is responsible for loading a project.godot file and/or data file
 * using the following merit order:
 *  - If using NetworkClient, try to lookup project file or fail.
 *  - If --main-pack was passed by the user (`p_main_pack`), load it or fail.
 *  - Search for project PCKs automatically. For each step we try loading a potential
 *    PCK, and if it doesn't work, we proceed to the next step. If any step succeeds,
 *    we try loading the project settings, and abort if it fails. Steps:
 *    o Bundled PCK in the executable.
 *    o [macOS only] PCK with same basename as the binary in the .app resource dir.
 *    o PCK with same basename as the binary in the binary's directory. We handle both
 *      changing the extension to '.pck' (e.g. 'win_game.exe' -> 'win_game.pck') and
 *      appending '.pck' to the binary name (e.g. 'linux_game' -> 'linux_game.pck').
 *    o PCK with the same basename as the binary in the current working directory.
 *      Same as above for the two possible PCK file names.
 *  - On relevant platforms (Android/iOS), lookup project file in OS resource path.
 *    If found, load it or fail.
 *  - Lookup project file in passed `p_path` (--path passed by the user), i.e. we
 *    are running from source code.
 *    If not found and `p_upwards` is true (--upwards passed by the user), look for
 *    project files in parent folders up to the system root (used to run a game
 *    from command line while in a subfolder).
 *    If a project file is found, load it or fail.
 *    If nothing was found, error out.
 */
Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, bool p_upwards, bool p_ignore_override) {