### Godot version

4.1.rc.custom_build. c83f912bc

### System information

Ubuntu 22.04 CI

### Issue description

When executing
```
extends Node
func _process(delta):

	var temp_variable35241 = RichTextLabel.new()
	add_child(temp_variable35241)
	temp_variable35241.set_fit_content(true)
	temp_variable35241.parse_bbcode("3188932498")
	temp_variable35241.queue_free()
```
this code freeze project in CI for at least 60 seconds

### Steps to reproduce

Above

### Minimal reproduction project

N/A
return line.get_height(theme_cache.line_separation);
}
void RichTextLabel::_update_theme_item_cache() {
	Control::_update_theme_item_cache();
	theme_cache.normal_style = get_theme_stylebox(SNAME("normal"));
	theme_cache.focus_style = get_theme_stylebox(SNAME("focus"));
	theme_cache.progress_bg_style = get_theme_stylebox(SNAME("background"), SNAME("ProgressBar"));
	theme_cache.progress_fg_style = get_theme_stylebox(SNAME("fill"), SNAME("ProgressBar"));
	theme_cache.line_separation = get_theme_constant(SNAME("line_separation"));
	theme_cache.normal_font = get_theme_font(SNAME("normal_font"));
	theme_cache.normal_font_size = get_theme_font_size(SNAME("normal_font_size"));
	theme_cache.default_color = get_theme_color(SNAME("default_color"));
	theme_cache.font_selected_color = get_theme_color(SNAME("font_selected_color"));
	use_selected_font_color = theme_cache.font_selected_color != Color(0, 0, 0, 0);
	theme_cache.selection_color = get_theme_color(SNAME("selection_color"));
	theme_cache.font_outline_color = get_theme_color(SNAME("font_outline_color"));
	theme_cache.font_shadow_color = get_theme_color(SNAME("font_shadow_color"));
	theme_cache.shadow_outline_size = get_theme_constant(SNAME("shadow_outline_size"));
	theme_cache.shadow_offset_x = get_theme_constant(SNAME("shadow_offset_x"));
	theme_cache.shadow_offset_y = get_theme_constant(SNAME("shadow_offset_y"));
	theme_cache.outline_size = get_theme_constant(SNAME("outline_size"));
	theme_cache.bold_font = get_theme_font(SNAME("bold_font"));
	theme_cache.bold_font_size = get_theme_font_size(SNAME("bold_font_size"));
	theme_cache.bold_italics_font = get_theme_font(SNAME("bold_italics_font"));
	theme_cache.bold_italics_font_size = get_theme_font_size(SNAME("bold_italics_font_size"));
	theme_cache.italics_font = get_theme_font(SNAME("italics_font"));
	theme_cache.italics_font_size = get_theme_font_size(SNAME("italics_font_size"));
	theme_cache.mono_font = get_theme_font(SNAME("mono_font"));
	theme_cache.mono_font_size = get_theme_font_size(SNAME("mono_font_size"));