### 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, "compression/formats/zstd/window_log_size", PROPERTY_HINT_RANGE, "10,30,1"), Compression::zstd_window_log_size);
	GLOBAL_DEF(PropertyInfo(Variant::INT, "compression/formats/zlib/compression_level", PROPERTY_HINT_RANGE, "-1,9,1"), Compression::zlib_level);
	GLOBAL_DEF(PropertyInfo(Variant::INT, "compression/formats/gzip/compression_level", PROPERTY_HINT_RANGE, "-1,9,1"), Compression::gzip_level);
	GLOBAL_DEF("debug/settings/crash_handler/message",
			String("Please include this when reporting the bug to the project developer."));
	GLOBAL_DEF("debug/settings/crash_handler/message.editor",
			String("Please include this when reporting the bug on: https://github.com/godotengine/godot/issues"));
	GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/occlusion_culling/bvh_build_quality", PROPERTY_HINT_ENUM, "Low,Medium,High"), 2);
	GLOBAL_DEF(PropertyInfo(Variant::INT, "memory/limits/multithreaded_server/rid_pool_prealloc", PROPERTY_HINT_RANGE, "0,500,1"), 60); /
	GLOBAL_DEF_RST("internationalization/rendering/force_right_to_left_layout_direction", false);
	GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "internationalization/rendering/root_node_layout_direction", PROPERTY_HINT_RANGE, "Based on Locale,Left-to-Right,Right-to-Left"), 0);
	GLOBAL_DEF(PropertyInfo(Variant::INT, "gui/timers/incremental_search_max_interval_msec", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"), 2000);
	GLOBAL_DEF_BASIC("gui/common/snap_controls_to_pixels", true);
	GLOBAL_DEF_BASIC("gui/fonts/dynamic_fonts/use_oversampling", true);
	GLOBAL_DEF("rendering/rendering_device/staging_buffer/block_size_kb", 256);
	GLOBAL_DEF("rendering/rendering_device/staging_buffer/max_size_mb", 128);
	GLOBAL_DEF("rendering/rendering_device/staging_buffer/texture_upload_region_size_px", 64);
	GLOBAL_DEF("rendering/rendering_device/vulkan/max_descriptors_per_pool", 64);
	GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Linear Mipmap,Nearest Mipmap"), 1);
	GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror"), 0);
	/
	GLOBAL_DEF_INTERNAL("application/config/features", PackedStringArray());
	GLOBAL_DEF_INTERNAL("internationalization/locale/translation_remaps", PackedStringArray());
	GLOBAL_DEF_INTERNAL("internationalization/locale/translations", PackedStringArray());
	GLOBAL_DEF_INTERNAL("internationalization/locale/translations_pot_files", PackedStringArray());
}
ProjectSettings::~ProjectSettings() {
	singleton = nullptr;
}