### Godot version

v4.1.rc2.mono.official [46424488e]

### System information

Windows 11 - v4.1.rc2 - Vulkan

### Issue description

I tried to move a RichTextLabel into a CenterContainer node and the editor crashed.

It seems the latest working version was **v4.1.beta2.mono.official [a2575cba4]**
I have a crash with all the snapshots that came after that one.

`ERROR: Failed method: CanvasItem::_redraw_callback. Message queue out of memory. Message queue out of memory. Try increasing 'memory.
   at: push_callablep (core/object/message_queue.cpp:96)
ERROR: Failed method: CanvasItem::_redraw_callback. Message queue out of memory. Message queue out of memory. Try increasing 'memory.
   at: push_callablep (core/object/message_queue.cpp:96)
ERROR: Failed method: CanvasItem::_redraw_callback. Message queue out of memory. Message queue out of memory. Try increasing 'memory.
   at: push_callablep (core/object/message_queue.cpp:96)
ERROR: Failed method: CanvasItem::_redraw_callback. Message queue out of memory. Message queue out of memory. Try increasing 'memory.
   at: push_callablep (core/object/message_queue.cpp:96)
ERROR: Failed method: EditorToaster::_error_handler_impl. Message queue out of memory. Message queue out of memory. Try increasing '.
   at: push_callablep (core/object/message_queue.cpp:96)
ERROR: Failed method: EditorToaster::_error_handler_impl. Message queue out of memory. Message queue out of memory. Try increasing '.`

### Steps to reproduce

- Open the project and the main scene
- Move the RichTextLabel into the CenterContainer
- Editor should crash 

### Minimal reproduction project

[bug-ui.zip](https://github.com/godotengine/godot/files/11926495/bug-ui.zip)

return progress_delay;
}
_FORCE_INLINE_ float RichTextLabel::_update_scroll_exceeds(float p_total_height, float p_ctrl_height, float p_width, int p_idx, float p_old_scroll, float p_text_rect_height) {
	updating_scroll = true;
	float total_height = p_total_height;
	bool exceeds = p_total_height > p_ctrl_height && scroll_active;
	if (exceeds != scroll_visible) {
		if (exceeds) {
			scroll_visible = true;
			scroll_w = vscroll->get_combined_minimum_size().width;
			vscroll->show();
			vscroll->set_anchor_and_offset(SIDE_LEFT, ANCHOR_END, -scroll_w);
		} else {
			scroll_visible = false;
			scroll_w = 0;
			vscroll->hide();
		}
		main->first_resized_line.store(0);
		total_height = 0;
		for (int j = 0; j <= p_idx; j++) {
			total_height = _resize_line(main, j, theme_cache.normal_font, theme_cache.normal_font_size, p_width, total_height);
			main->first_resized_line.store(j);
		}
	}
	vscroll->set_max(total_height);
	vscroll->set_page(p_text_rect_height);
	if (scroll_follow && scroll_following) {
		vscroll->set_value(total_height);
	} else {
		vscroll->set_value(p_old_scroll);