### 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
saturation = saturation_option->value.to_float();
			}
			float value = 0.8f;
			OptionMap::Iterator value_option = bbcode_options.find("val");
			if (value_option) {
				value = value_option->value.to_float();
			}
			float frequency = 1.0f;
			OptionMap::Iterator frequency_option = bbcode_options.find("freq");
			if (frequency_option) {
				frequency = frequency_option->value.to_float();
			}
			push_rainbow(saturation, value, frequency);
			pos = brk_end + 1;
			tag_stack.push_front("rainbow");
			set_process_internal(true);
		} else if (tag.begins_with("bgcolor=")) {
			String color_str = tag.substr(8, tag.length()).unquote();
			Color color = Color::from_string(color_str, theme_cache.default_color);
			push_bgcolor(color);
			pos = brk_end + 1;
			tag_stack.push_front("bgcolor");
		} else if (tag.begins_with("fgcolor=")) {
			String color_str = tag.substr(8, tag.length()).unquote();
			Color color = Color::from_string(color_str, theme_cache.default_color);
			push_fgcolor(color);
			pos = brk_end + 1;
			tag_stack.push_front("fgcolor");
		} else {
			Vector<String> &expr = split_tag_block;