### 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
ERR_FAIL_COND(theme_cache.bold_italics_font.is_null());
	_push_def_font(BOLD_ITALICS_FONT);
}
void RichTextLabel::push_italics() {
	ERR_FAIL_COND(theme_cache.italics_font.is_null());
	ItemFont *item_font = _find_font(current);
	_push_def_font((item_font && item_font->def_font == BOLD_FONT) ? BOLD_ITALICS_FONT : ITALICS_FONT);
}
void RichTextLabel::push_mono() {
	ERR_FAIL_COND(theme_cache.mono_font.is_null());
	_push_def_font(MONO_FONT);
}
void RichTextLabel::push_font_size(int p_font_size) {
	_stop_thread();
	MutexLock data_lock(data_mutex);
	ERR_FAIL_COND(current->type == ITEM_TABLE);
	ItemFontSize *item = memnew(ItemFontSize);
	item->font_size = p_font_size;
	_add_item(item, true);
}
void RichTextLabel::push_outline_size(int p_ol_size) {
	_stop_thread();
	MutexLock data_lock(data_mutex);
	ERR_FAIL_COND(current->type == ITEM_TABLE);
	ItemOutlineSize *item = memnew(ItemOutlineSize);
	item->outline_size = p_ol_size;
	_add_item(item, true);
}
void RichTextLabel::push_color(const Color &p_color) {