### Godot version

v4.1.1.stable.official [bd6af8e0e]

### System information

Godot v4.1.1.stable - Gentoo 2.14 - Vulkan (Compatibility) - AMD Radeon Vega 8 Graphics (raven, LLVM 16.0.6, DRM 3.49, 6.1.41-gentoo-x86_64) () - AMD Ryzen 5 3500U with Radeon Vega Mobile Gfx (8 Threads)

### Issue description

This minimal project crashes when run with the background TextRect visible, but if you toggle its visibility, no crash occurs. Note that this only started when I scaled down the TileMap to half (either by scaling MapCenter or Dungeon).

```================================================================       [0/93533]
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.1.1.stable.official (bd6af8e0ea69167dd0627f3bd54
f9105bda0f8b5)
Dumping the backtrace. Please include this when reporting the bug to the project
 developer.
[1] /lib64/libc.so.6(+0x38790) [0x7fd308df7790] (??:0)
[2] /lib64/libc.so.6(+0x14e237) [0x7fd308f0d237] (??:0)
[3] /usr/local/bin/Godot_v4.1.1-stable_linux.x86_64() [0x1c66508] (??:0)
[4] /usr/local/bin/Godot_v4.1.1-stable_linux.x86_64() [0x1c71f1b] (??:0)
[5] /usr/local/bin/Godot_v4.1.1-stable_linux.x86_64() [0x1c9c1d3] (??:0)
[6] /usr/local/bin/Godot_v4.1.1-stable_linux.x86_64() [0x1c9ff22] (??:0)
[7] /usr/local/bin/Godot_v4.1.1-stable_linux.x86_64() [0x4339a9c] (??:0)
[8] /usr/local/bin/Godot_v4.1.1-stable_linux.x86_64() [0x4342037] (??:0)
[9] /usr/local/bin/Godot_v4.1.1-stable_linux.x86_64() [0x3dcc902] (??:0)
[10] /usr/local/bin/Godot_v4.1.1-stable_linux.x86_64() [0xf16a56] (??:0)
[11] /usr/local/bin/Godot_v4.1.1-stable_linux.x86_64() [0xe46444] (??:0)
[12] /lib64/libc.so.6(+0x2364a) [0x7fd308de264a] (??:0)
[13] /lib64/libc.so.6(__libc_start_main+0x85) [0x7fd308de2705] (??:0)
[14] /usr/local/bin/Godot_v4.1.1-stable_linux.x86_64() [0xe777ae] (??:0)
-- END OF BACKTRACE --
================================================================
```

### Steps to reproduce

1. Run the attached project to see the crash.
2. Click the "toggle visibility" button beside Background to see no crash.

### Minimal reproduction project

[mrp.zip](https://github.com/godotengine/godot/files/12437395/mrp.zip)

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;
	}
	for (int i = 0; i < 4; i++) {
		glViewport((state.shadow_texture_size / 4) * i, p_shadow_index * 2, (state.shadow_texture_size / 4), 2);
		Projection projection;
		{
			real_t fov = 90;
			real_t nearp = p_near;
			real_t farp = p_far;
			real_t aspect = 1.0;
			real_t ymax = nearp * Math::tan(Math::deg_to_rad(fov * 0.5));
			real_t ymin = -ymax;
			real_t xmin = ymin * aspect;
			real_t xmax = ymax * aspect;
			projection.set_frustum(xmin, xmax, ymin, ymax, nearp, farp);
		}
		Vector3 cam_target = Basis::from_euler(Vector3(0, 0, Math_TAU * ((i + 3) / 4.0))).xform(Vector3(0, 1, 0));
		projection = projection * Projection(Transform3D().looking_at(cam_target, Vector3(0, 0, -1)).affine_inverse());
		shadow_render.shader.version_set_uniform(CanvasOcclusionShaderGLES3::PROJECTION, projection, shadow_render.shader_version, variant);
		static const Vector2 directions[4] = { Vector2(1, 0), Vector2(0, 1), Vector2(-1, 0), Vector2(0, -1) };
		shadow_render.shader.version_set_uniform(CanvasOcclusionShaderGLES3::DIRECTION, directions[i].x, directions[i].y, shadow_render.shader_version, variant);
		shadow_render.shader.version_set_uniform(CanvasOcclusionShaderGLES3::Z_FAR, p_far, 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)) {