### Godot version

4.1.rc2

### System information

MacOS 13.4.1

### Issue description

![image](https://github.com/godotengine/godot/assets/4489798/cf4d2074-7d8a-48d4-ba87-ba04d7f2dda1)
Scrollbar does not show when output values are provided after starting the game. Also, it does not scroll to the bottom automatically need to press the search button to show the scrollbar or any button that refreshes the output window.

### Steps to reproduce

1. Create a project
2. Run in _process function a `print()` with some values to output it in the `output window`
3. Turn the game on and off until the scrollbar stops appearing.

### Minimal reproduction project

[ScrollbarBug.zip](https://github.com/godotengine/godot/files/11924845/ScrollbarBug.zip)

case ITEM_TABLE: {
				offset += 1;
			} break;
			default:
				break;
		}
	}
	return p_item_from;
}
String RichTextLabel::_roman(int p_num, bool p_capitalize) const {
	if (p_num > 3999) {
		return "ERR";
	};
	String s;
	if (p_capitalize) {
		const String roman_M[] = { "", "M", "MM", "MMM" };
		const String roman_C[] = { "", "C", "CC", "CCC", "CD", "D", "DC", "DCC", "DCCC", "CM" };
		const String roman_X[] = { "", "X", "XX", "XXX", "XL", "L", "LX", "LXX", "LXXX", "XC" };
		const String roman_I[] = { "", "I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX" };
		s = roman_M[p_num / 1000] + roman_C[(p_num % 1000) / 100] + roman_X[(p_num % 100) / 10] + roman_I[p_num % 10];
	} else {
		const String roman_M[] = { "", "m", "mm", "mmm" };
		const String roman_C[] = { "", "c", "cc", "ccc", "cd", "d", "dc", "dcc", "dccc", "cm" };
		const String roman_X[] = { "", "x", "xx", "xxx", "xl", "l", "lx", "lxx", "lxxx", "xc" };
		const String roman_I[] = { "", "i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix" };
		s = roman_M[p_num / 1000] + roman_C[(p_num % 1000) / 100] + roman_X[(p_num % 100) / 10] + roman_I[p_num % 10];
	}
	return s;
}
String RichTextLabel::_letters(int p_num, bool p_capitalize) const {