### 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)

for (int i = 0; i < p_custom_features.size(); i++) {
		if (i > 0) {
			save_features += ",";
		}
		String f = p_custom_features[i].strip_edges().replace("\"", "");
		save_features += f;
	}
	if (p_path.ends_with(".godot") || p_path.ends_with("override.cfg")) {
		return _save_settings_text(p_path, save_props, p_custom, save_features);
	} else if (p_path.ends_with(".binary")) {
		return _save_settings_binary(p_path, save_props, p_custom, save_features);
	} else {
		ERR_FAIL_V_MSG(ERR_FILE_UNRECOGNIZED, "Unknown config file format: " + p_path + ".");
	}
}
Variant _GLOBAL_DEF(const String &p_var, const Variant &p_default, bool p_restart_if_changed, bool p_ignore_value_in_docs, bool p_basic, bool p_internal) {
	Variant ret;
	if (!ProjectSettings::get_singleton()->has_setting(p_var)) {
		ProjectSettings::get_singleton()->set(p_var, p_default);
	}
	ret = GLOBAL_GET(p_var);
	ProjectSettings::get_singleton()->set_initial_value(p_var, p_default);
	ProjectSettings::get_singleton()->set_builtin_order(p_var);
	ProjectSettings::get_singleton()->set_as_basic(p_var, p_basic);
	ProjectSettings::get_singleton()->set_restart_if_changed(p_var, p_restart_if_changed);
	ProjectSettings::get_singleton()->set_ignore_value_in_docs(p_var, p_ignore_value_in_docs);
	ProjectSettings::get_singleton()->set_as_internal(p_var, p_internal);
	return ret;
}
Variant _GLOBAL_DEF(const PropertyInfo &p_info, const Variant &p_default, bool p_restart_if_changed, bool p_ignore_value_in_docs, bool p_basic, bool p_internal) {