### 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
int remaining_width = available_width;
				table->total_width = theme_cache.table_h_separation;
				for (int i = 0; i < col_count; i++) {
					remaining_width -= table->columns[i].min_width;
					if (table->columns[i].max_width > table->columns[i].min_width) {
						table->columns[i].expand = true;
					}
					if (table->columns[i].expand) {
						total_ratio += table->columns[i].expand_ratio;
					}
				}
				
				for (int i = 0; i < col_count; i++) {
					table->columns[i].width = table->columns[i].min_width;
					if (table->columns[i].expand && total_ratio > 0 && remaining_width > 0) {
						table->columns[i].width += table->columns[i].expand_ratio * remaining_width / total_ratio;
					}
					if (i != col_count - 1) {
						table->total_width += table->columns[i].width + theme_cache.table_h_separation;
					} else {
						table->total_width += table->columns[i].width;
					}
				}
				
				bool table_need_fit = true;
				while (table_need_fit) {
					table_need_fit = false;
					
					for (int i = 0; i < col_count; i++) {
						if (!table->columns[i].expand) {