### Godot version

4.1.1-stable

### System information

Windows 10

### Issue description

When the project loads in editor, all the settings defined in project settings will be loaded over the default values, but when running the game nearly 95% of them will be ignored resulting in just loading the default settings.

here it's just loading only 4 variables from project setting and i have added the fifth in this pull request https://github.com/godotengine/godot/pull/80151
![image](https://github.com/godotengine/godot/assets/53877170/926168a6-e6d3-4983-b59d-7fd202db681d)

if (state.canvas_instance_data_buffers[state.current_data_buffer_index].last_frame_used < RSG::rasterizer->get_frame_number() - 2) {
#ifndef WEB_ENABLED
				
				glClientWaitSync(state.canvas_instance_data_buffers[state.current_data_buffer_index].fence, 0, 100000000); 
#endif
				state.canvas_instance_data_buffers[state.current_data_buffer_index].last_frame_used = RSG::rasterizer->get_frame_number();
				glDeleteSync(state.canvas_instance_data_buffers[state.current_data_buffer_index].fence);
				state.canvas_instance_data_buffers[state.current_data_buffer_index].fence = GLsync();
			} else {
				
				
				_allocate_instance_data_buffer();
			}
		} else {
			
			state.canvas_instance_data_buffers[state.current_data_buffer_index].last_frame_used = RSG::rasterizer->get_frame_number();
			glDeleteSync(state.canvas_instance_data_buffers[state.current_data_buffer_index].fence);
			state.canvas_instance_data_buffers[state.current_data_buffer_index].fence = GLsync();
		}
	}
	
	uint32_t light_count = 0;
	uint32_t directional_light_count = 0;
	{
		Light *l = p_directional_light_list;
		uint32_t index = 0;
		while (l) {
			if (index == data.max_lights_per_render) {
				l->render_index_cache = -1;