### Godot version

4.2.dev3

### System information

Godot v4.2.dev3 - Arch Linux #0~20230811.g489fabdc SMP PREEMPT_DYNAMIC Sat Aug 12 02:04:20 UT - X11 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1650 (nvidia; 535.98) - Intel(R) Core(TM) i5-9300H CPU @ 2.40GHz (8 Threads)

### Issue description

After turning on 2d hdr and font msdf at the same time, there is a problem with ui text rendering.

2d hdr off:
![图片](https://github.com/godotengine/godot/assets/52148221/37074fde-a0ce-4d3f-8bfc-dcf3f910cb12)
2d hdr on:
![图片](https://github.com/godotengine/godot/assets/52148221/b858899c-e08f-4bac-b0d6-4385d9a46114)


### Steps to reproduce

1. Open msdf for default font or custom font.
2. Turn on 2d hdr.
3. Add a Label node and enter text, the text rendering is destroyed.

### Minimal reproduction project

N/A
{
		
		State::Buffer state_buffer;
		Size2i ssize = texture_storage->render_target_get_size(p_to_render_target);
		Transform3D screen_transform;
		screen_transform.translate_local(-(ssize.width / 2.0f), -(ssize.height / 2.0f), 0.0f);
		screen_transform.scale(Vector3(2.0f / ssize.width, 2.0f / ssize.height, 1.0f));
		_update_transform_to_mat4(screen_transform, state_buffer.screen_transform);
		_update_transform_2d_to_mat4(p_canvas_transform, state_buffer.canvas_transform);
		Transform2D normal_transform = p_canvas_transform;
		normal_transform.columns[0].normalize();
		normal_transform.columns[1].normalize();
		normal_transform.columns[2] = Vector2();
		_update_transform_2d_to_mat4(normal_transform, state_buffer.canvas_normal_transform);
		state_buffer.canvas_modulate[0] = p_modulate.r;
		state_buffer.canvas_modulate[1] = p_modulate.g;
		state_buffer.canvas_modulate[2] = p_modulate.b;
		state_buffer.canvas_modulate[3] = p_modulate.a;
		Size2 render_target_size = texture_storage->render_target_get_size(p_to_render_target);
		state_buffer.screen_pixel_size[0] = 1.0 / render_target_size.x;
		state_buffer.screen_pixel_size[1] = 1.0 / render_target_size.y;
		state_buffer.time = state.time;
		state_buffer.use_pixel_snap = p_snap_2d_vertices_to_pixel;
		state_buffer.directional_light_count = directional_light_count;
		Vector2 canvas_scale = p_canvas_transform.get_scale();
		state_buffer.sdf_to_screen[0] = render_target_size.width / canvas_scale.x;
		state_buffer.sdf_to_screen[1] = render_target_size.height / canvas_scale.y;
		state_buffer.screen_to_sdf[0] = 1.0 / state_buffer.sdf_to_screen[0];
		state_buffer.screen_to_sdf[1] = 1.0 / state_buffer.sdf_to_screen[1];
		Rect2 sdf_rect = texture_storage->render_target_get_sdf_rect(p_to_render_target);