### 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 context_menu_enabled;
}
void RichTextLabel::set_shortcut_keys_enabled(bool p_enabled) {
	shortcut_keys_enabled = p_enabled;
}
bool RichTextLabel::is_shortcut_keys_enabled() const {
	return shortcut_keys_enabled;
}
PopupMenu *RichTextLabel::get_menu() const {
	if (!menu) {
		const_cast<RichTextLabel *>(this)->_generate_context_menu();
	}
	return menu;
}
bool RichTextLabel::is_menu_visible() const {
	return menu && menu->is_visible();
}
String RichTextLabel::get_selected_text() const {
	if (!selection.active || !selection.enabled) {
		return "";
	}
	String txt;
	int to_line = main->first_invalid_line.load();
	for (int i = 0; i < to_line; i++) {
		txt += _get_line_text(main, i, selection);
	}
	return txt;
}
void RichTextLabel::deselect() {