### Godot version

4.1 

### System information

Win 10

### Issue description

![image](https://github.com/godotengine/godot/assets/3350340/fb4d82dc-0301-46d4-85e8-032c32b09fcf)

When causing _"output oveflow"_ by printing a lot of text, formating breaks. Possible because enclosing tag get flushed.

Suggested solution: clear text formating after _output oveflow_ warning.

### Steps to reproduce

Print a lot of text with different text tags (like [color] or [bgcolor]) to console. For example in _process function.

### Minimal reproduction project

N/A
for (int i = fi; i < (int)main->lines.size(); i++) {
			total_height = _resize_line(main, i, theme_cache.normal_font, theme_cache.normal_font_size, text_rect.get_size().width - scroll_w, total_height);
			total_height = _update_scroll_exceeds(total_height, ctrl_height, text_rect.get_size().width, i, old_scroll, text_rect.size.height);
			main->first_resized_line.store(i);
		}
		main->first_resized_line.store(main->lines.size());
		if (fit_content) {
			update_minimum_size();
		}
		validating.store(false);
		return true;
	}
	validating.store(false);
	stop_thread.store(false);
	if (threaded) {
		updating.store(true);
		loaded.store(true);
		task = WorkerThreadPool::get_singleton()->add_template_task(this, &RichTextLabel::_thread_function, nullptr, true, vformat("RichTextLabelShape:%x", (int64_t)get_instance_id()));
		set_physics_process_internal(true);
		loading_started = OS::get_singleton()->get_ticks_msec();
		return false;
	} else {
		updating.store(true);
		_process_line_caches();
		updating.store(false);
		queue_redraw();
		return true;
	}
}
void RichTextLabel::_process_line_caches() {