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

_
FLAGS_INSTANCING_MASK = 0x7F,
		FLAGS_INSTANCING_HAS_COLORS = (1 << 7),
		FLAGS_INSTANCING_HAS_CUSTOM_DATA = (1 << 8),
		FLAGS_CLIP_RECT_UV = (1 << 9),
		FLAGS_TRANSPOSE_RECT = (1 << 10),
		FLAGS_NINEPACH_DRAW_CENTER = (1 << 12),
		FLAGS_USING_PARTICLES = (1 << 13),
		FLAGS_USE_SKELETON = (1 << 15),
		FLAGS_NINEPATCH_H_MODE_SHIFT = 16,
		FLAGS_NINEPATCH_V_MODE_SHIFT = 18,
		FLAGS_LIGHT_COUNT_SHIFT = 20,
		FLAGS_DEFAULT_NORMAL_MAP_USED = (1 << 26),
		FLAGS_DEFAULT_SPECULAR_MAP_USED = (1 << 27),
		FLAGS_USE_MSDF = (1 << 28),
		FLAGS_USE_LCD = (1 << 29),
		FLAGS_FLIP_H = (1 << 30),
		FLAGS_FLIP_V = (1 << 31),
	};
	enum {
		LIGHT_FLAGS_TEXTURE_MASK = 0xFFFF,
		LIGHT_FLAGS_BLEND_SHIFT = 16,
		LIGHT_FLAGS_BLEND_MASK = (3 << 16),
		LIGHT_FLAGS_BLEND_MODE_ADD = (0 << 16),
		LIGHT_FLAGS_BLEND_MODE_SUB = (1 << 16),
		LIGHT_FLAGS_BLEND_MODE_MIX = (2 << 16),
		LIGHT_FLAGS_BLEND_MODE_MASK = (3 << 16),
		LIGHT_FLAGS_HAS_SHADOW = (1 << 20),
		LIGHT_FLAGS_FILTER_SHIFT = 22
	};
	enum {