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

_
glDeleteTextures(1, &state.shadow_texture);
			glDeleteRenderbuffers(1, &state.shadow_depth_buffer);
			state.shadow_fb = 0;
			state.shadow_texture = 0;
			state.shadow_depth_buffer = 0;
			WARN_PRINT("Could not create CanvasItem shadow atlas, status: " + GLES3::TextureStorage::get_singleton()->get_framebuffer_error(status));
		}
		GLES3::Utilities::get_singleton()->texture_allocated_data(state.shadow_texture, state.shadow_texture_size * data.max_lights_per_render * 2 * 4, "2D shadow atlas texture");
		glBindFramebuffer(GL_FRAMEBUFFER, GLES3::TextureStorage::system_fbo);
	}
}
void RasterizerCanvasGLES3::render_sdf(RID p_render_target, LightOccluderInstance *p_occluders) {
	GLES3::TextureStorage *texture_storage = GLES3::TextureStorage::get_singleton();
	GLuint fb = texture_storage->render_target_get_sdf_framebuffer(p_render_target);
	Rect2i rect = texture_storage->render_target_get_sdf_rect(p_render_target);
	Transform2D to_sdf;
	to_sdf.columns[0] *= rect.size.width;
	to_sdf.columns[1] *= rect.size.height;
	to_sdf.columns[2] = rect.position;
	Transform2D to_clip;
	to_clip.columns[0] *= 2.0;
	to_clip.columns[1] *= 2.0;
	to_clip.columns[2] = -Vector2(1.0, 1.0);
	to_clip = to_clip * to_sdf.affine_inverse();
	glBindFramebuffer(GL_FRAMEBUFFER, fb);
	glViewport(0, 0, rect.size.width, rect.size.height);
	glDepthMask(GL_FALSE);
	glDisable(GL_DEPTH_TEST);
	glDisable(GL_BLEND);
	glDisable(GL_CULL_FACE);