### Godot version

4.1.1 stable

### System information

Windows 10

### Issue description

this is the default size loaded on startup 1024 which seems fine but it actually have loaded the default [2048] and ignored the size in project settings
![image](https://github.com/godotengine/godot/assets/53877170/c8c71de7-468a-487f-8e6c-dba1ce0f8fa5)

changing it now to any size will break it 
[2048]
![image](https://github.com/godotengine/godot/assets/53877170/3082ff09-b7d7-41f7-8fbb-813074a54135)

[512]
![image](https://github.com/godotengine/godot/assets/53877170/5ea4620f-52b5-4d0e-a5f5-747e777cd59d)


### Steps to reproduce

change 2d shadow atlas size in project settings while using compatibility renderer. 

### Minimal reproduction project

_
glEnable(GL_DEPTH_TEST);
	glDepthFunc(GL_LESS);
	glDisable(GL_BLEND);
	glEnable(GL_SCISSOR_TEST);
	glScissor(0, p_shadow_index * 2, state.shadow_texture_size, 2);
	glClearColor(1.0, 1.0, 1.0, 1.0);
	glClearDepth(1.0);
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	glCullFace(GL_BACK);
	glDisable(GL_CULL_FACE);
	RS::CanvasOccluderPolygonCullMode cull_mode = RS::CANVAS_OCCLUDER_POLYGON_CULL_DISABLED;
	CanvasOcclusionShaderGLES3::ShaderVariant variant = config->float_texture_supported ? CanvasOcclusionShaderGLES3::MODE_SHADOW : CanvasOcclusionShaderGLES3::MODE_SHADOW_RGBA;
	bool success = shadow_render.shader.version_bind_shader(shadow_render.shader_version, variant);
	if (!success) {
		return;
	}
	Projection projection;
	projection.set_orthogonal(-half_size, half_size, -0.5, 0.5, 0.0, distance);
	projection = projection * Projection(Transform3D().looking_at(Vector3(0, 1, 0), Vector3(0, 0, -1)).affine_inverse());
	shadow_render.shader.version_set_uniform(CanvasOcclusionShaderGLES3::PROJECTION, projection, shadow_render.shader_version, variant);
	shadow_render.shader.version_set_uniform(CanvasOcclusionShaderGLES3::DIRECTION, 0.0, 1.0, shadow_render.shader_version, variant);
	shadow_render.shader.version_set_uniform(CanvasOcclusionShaderGLES3::Z_FAR, distance, shadow_render.shader_version, variant);
	LightOccluderInstance *instance = p_occluders;
	while (instance) {
		OccluderPolygon *co = occluder_polygon_owner.get_or_null(instance->occluder);
		if (!co || co->vertex_array == 0 || !(p_light_mask & instance->light_mask)) {
			instance = instance->next;
			continue;
		}
		Transform2D modelview = to_light_xform * instance->xform_cache;