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

state.instance_data_array[r_index].dst_rect[i] = 0.0;
			state.instance_data_array[r_index].lights[i] = uint32_t(0);
		}
		state.instance_data_array[r_index].color_texture_pixel_size[0] = 0.0;
		state.instance_data_array[r_index].color_texture_pixel_size[1] = 0.0;
		state.instance_data_array[r_index].pad[0] = 0.0;
		state.instance_data_array[r_index].pad[1] = 0.0;
		state.instance_data_array[r_index].lights[0] = lights[0];
		state.instance_data_array[r_index].lights[1] = lights[1];
		state.instance_data_array[r_index].lights[2] = lights[2];
		state.instance_data_array[r_index].lights[3] = lights[3];
		state.instance_data_array[r_index].flags = base_flags | (state.instance_data_array[r_index == 0 ? 0 : r_index - 1].flags & (FLAGS_DEFAULT_NORMAL_MAP_USED | FLAGS_DEFAULT_SPECULAR_MAP_USED)); 
		Color blend_color = base_color;
		GLES3::CanvasShaderData::BlendMode blend_mode = p_blend_mode;
		if (c->type == Item::Command::TYPE_RECT) {
			const Item::CommandRect *rect = static_cast<const Item::CommandRect *>(c);
			if (rect->flags & CANVAS_RECT_LCD) {
				blend_mode = GLES3::CanvasShaderData::BLEND_MODE_LCD;
				blend_color = rect->modulate * base_color;
			}
		}
		if (blend_mode != state.canvas_instance_batches[state.current_batch_index].blend_mode || blend_color != state.canvas_instance_batches[state.current_batch_index].blend_color) {
			_new_batch(r_batch_broken);
			state.canvas_instance_batches[state.current_batch_index].blend_mode = blend_mode;
			state.canvas_instance_batches[state.current_batch_index].blend_color = blend_color;
		}
		switch (c->type) {
			case Item::Command::TYPE_RECT: {
				const Item::CommandRect *rect = static_cast<const Item::CommandRect *>(c);
				if (rect->flags & CANVAS_RECT_TILE && state.canvas_instance_batches[state.current_batch_index].repeat != RenderingServer::CanvasItemTextureRepeat::CANVAS_ITEM_TEXTURE_REPEAT_ENABLED) {