### 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
selection.active = false;
	queue_redraw();
}
void RichTextLabel::selection_copy() {
	String txt = get_selected_text();
	if (!txt.is_empty()) {
		DisplayServer::get_singleton()->clipboard_set(txt);
	}
}
void RichTextLabel::select_all() {
	if (!selection.enabled) {
		return;
	}
	Item *it = main;
	Item *from_item = nullptr;
	Item *to_item = nullptr;
	while (it) {
		if (it->type != ITEM_FRAME) {
			if (!from_item) {
				from_item = it;
			} else {
				to_item = it;
			}