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

GLOBAL_DEF(PropertyInfo(Variant::INT, "display/window/size/window_width_override", PROPERTY_HINT_RANGE, "0,7680,1,or_greater"), 0); /
	GLOBAL_DEF(PropertyInfo(Variant::INT, "display/window/size/window_height_override", PROPERTY_HINT_RANGE, "0,4320,1,or_greater"), 0); /
	GLOBAL_DEF("display/window/energy_saving/keep_screen_on", true);
	GLOBAL_DEF("display/window/energy_saving/keep_screen_on.editor", false);
	GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "audio/buses/default_bus_layout", PROPERTY_HINT_FILE, "*.tres"), "res://default_bus_layout.tres");
	GLOBAL_DEF_RST("audio/general/text_to_speech", false);
	GLOBAL_DEF_RST(PropertyInfo(Variant::FLOAT, "audio/general/2d_panning_strength", PROPERTY_HINT_RANGE, "0,2,0.01"), 0.5f);
	GLOBAL_DEF_RST(PropertyInfo(Variant::FLOAT, "audio/general/3d_panning_strength", PROPERTY_HINT_RANGE, "0,2,0.01"), 0.5f);
	PackedStringArray extensions;
	extensions.push_back("gd");
	if (Engine::get_singleton()->has_singleton("GodotSharp")) {
		extensions.push_back("cs");
	}
	extensions.push_back("gdshader");
	GLOBAL_DEF(PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/script/search_in_file_extensions"), extensions);
	_add_builtin_input_map();
	/
	custom_prop_info["display/window/handheld/orientation"] = PropertyInfo(Variant::INT, "display/window/handheld/orientation", PROPERTY_HINT_ENUM, "Landscape,Portrait,Reverse Landscape,Reverse Portrait,Sensor Landscape,Sensor Portrait,Sensor");
	GLOBAL_DEF("display/window/subwindows/embed_subwindows", true);
	/
	custom_prop_info["display/window/vsync/vsync_mode"] = PropertyInfo(Variant::INT, "display/window/vsync/vsync_mode", PROPERTY_HINT_ENUM, "Disabled,Enabled,Adaptive,Mailbox");
	custom_prop_info["rendering/driver/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/driver/threads/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded");
	GLOBAL_DEF("physics/2d/run_on_separate_thread", false);
	GLOBAL_DEF("physics/3d/run_on_separate_thread", false);
	GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/window/stretch/mode", PROPERTY_HINT_ENUM, "disabled,canvas_items,viewport"), "disabled");
	GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height,expand"), "keep");
	GLOBAL_DEF_BASIC(PropertyInfo(Variant::FLOAT, "display/window/stretch/scale", PROPERTY_HINT_RANGE, "0.5,8.0,0.01"), 1.0);
	GLOBAL_DEF(PropertyInfo(Variant::INT, "debug/settings/profiler/max_functions", PROPERTY_HINT_RANGE, "128,65535,1"), 16384);
	GLOBAL_DEF(PropertyInfo(Variant::BOOL, "compression/formats/zstd/long_distance_matching"), Compression::zstd_long_distance_matching);
	GLOBAL_DEF(PropertyInfo(Variant::INT, "compression/formats/zstd/compression_level", PROPERTY_HINT_RANGE, "1,22,1"), Compression::zstd_level);