### 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 (clight->shadow.enabled) {
				state.light_uniforms[index].flags |= LIGHT_FLAGS_HAS_SHADOW;
			}
			l->render_index_cache = index;
			index++;
			l = l->next_ptr;
		}
		light_count = index;
		directional_light_count = light_count;
		state.using_directional_lights = directional_light_count > 0;
	}
	
	{
		Light *l = p_light_list;
		uint32_t index = light_count;
		while (l) {
			if (index == data.max_lights_per_render) {
				l->render_index_cache = -1;
				l = l->next_ptr;
				continue;
			}
			CanvasLight *clight = canvas_light_owner.get_or_null(l->light_internal);
			if (!clight) { 
				l->render_index_cache = -1;
				l = l->next_ptr;
				ERR_CONTINUE(!clight);
			}
			Vector2 canvas_light_pos = p_canvas_transform.xform(l->xform.get_origin()); 
			state.light_uniforms[index].position[0] = canvas_light_pos.x;
			state.light_uniforms[index].position[1] = canvas_light_pos.y;