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

_
};
	struct PolygonBuffers {
		GLuint vertex_buffer = 0;
		GLuint vertex_array = 0;
		GLuint index_buffer = 0;
		int count = 0;
		bool color_disabled = false;
		Color color;
	};
	struct {
		HashMap<PolygonID, PolygonBuffers> polygons;
		PolygonID last_id = 0;
	} polygon_buffers;
	RendererCanvasRender::PolygonID request_polygon(const Vector<int> &p_indices, const Vector<Point2> &p_points, const Vector<Color> &p_colors, const Vector<Point2> &p_uvs = Vector<Point2>(), const Vector<int> &p_bones = Vector<int>(), const Vector<float> &p_weights = Vector<float>()) override;
	void free_polygon(PolygonID p_polygon) override;
	struct InstanceData {
		float world[6];
		float color_texture_pixel_size[2];
		union {
			
			struct {
				float modulation[4];
				union {
					float msdf[4];
					float ninepatch_margins[4];
				};
				float dst_rect[4];
				float src_rect[4];
				float pad[2];
			};