### 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)

} else {
				push_font(fc, fnt_size);
			}
			pos = brk_end + 1;
			tag_stack.push_front("font");
		} else if (tag.begins_with("outline_size=")) {
			int fnt_size = tag.substr(13, tag.length()).to_int();
			if (fnt_size > 0) {
				push_outline_size(fnt_size);
			}
			pos = brk_end + 1;
			tag_stack.push_front("outline_size");
		} else if (bbcode_name == "fade") {
			int start_index = 0;
			OptionMap::Iterator start_option = bbcode_options.find("start");
			if (start_option) {
				start_index = start_option->value.to_int();
			}
			int length = 10;
			OptionMap::Iterator length_option = bbcode_options.find("length");
			if (length_option) {
				length = length_option->value.to_int();
			}
			push_fade(start_index, length);
			pos = brk_end + 1;
			tag_stack.push_front("fade");
		} else if (bbcode_name == "shake") {
			int strength = 5;
			OptionMap::Iterator strength_option = bbcode_options.find("level");
			if (strength_option) {