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

_
BASE_UNIFORM_LOCATION = 0,
		GLOBAL_UNIFORM_LOCATION = 1,
		LIGHT_UNIFORM_LOCATION = 2,
		INSTANCE_UNIFORM_LOCATION = 3,
		MATERIAL_UNIFORM_LOCATION = 4,
	};
	struct StateBuffer {
		float canvas_transform[16];
		float screen_transform[16];
		float canvas_normal_transform[16];
		float canvas_modulate[4];
		float screen_pixel_size[2];
		float time;
		uint32_t use_pixel_snap;
		float sdf_to_tex[4];
		float sdf_to_screen[2];
		float screen_to_sdf[2];
		uint32_t directional_light_count;
		float tex_to_sdf;
		uint32_t pad1;
		uint32_t pad2;