### 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
String fnt = tag.substr(5, tag.length()).unquote();
			Ref<Font> fc = ResourceLoader::load(fnt, "Font");
			if (fc.is_valid()) {
				push_font(fc);
			}
			pos = brk_end + 1;
			tag_stack.push_front("font");
		} else if (tag.begins_with("font ")) {
			Vector<String> subtag = tag.substr(2, tag.length()).split(" ");
			_normalize_subtags(subtag);
			Ref<Font> font = theme_cache.normal_font;
			DefaultFont def_font = NORMAL_FONT;
			ItemFont *font_it = _find_font(current);
			if (font_it) {
				if (font_it->font.is_valid()) {
					font = font_it->font;
					def_font = font_it->def_font;
				}
			}
			Ref<FontVariation> fc;
			fc.instantiate();
			int fnt_size = -1;
			for (int i = 1; i < subtag.size(); i++) {
				Vector<String> subtag_a = subtag[i].split("=", true, 1);
				_normalize_subtags(subtag_a);
				if (subtag_a.size() == 2) {
					if (subtag_a[0] == "name" || subtag_a[0] == "n") {
						String fnt = subtag_a[1];
						Ref<Font> font_data = ResourceLoader::load(fnt, "Font");
						if (font_data.is_valid()) {