### 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
MENU_COPY,
		MENU_SELECT_ALL,
		MENU_MAX
	};
	enum DefaultFont {
		NORMAL_FONT,
		BOLD_FONT,
		ITALICS_FONT,
		BOLD_ITALICS_FONT,
		MONO_FONT,
		CUSTOM_FONT,
	};
protected:
	virtual void _update_theme_item_cache() override;
	void _notification(int p_what);
	static void _bind_methods();
private:
	struct Item;
	struct Line {
		Item *from = nullptr;
		Ref<TextParagraph> text_buf;
		Color dc_color;
		int dc_ol_size = 0;
		Color dc_ol_color;
		Vector2 offset;
		int char_offset = 0;
		int char_count = 0;
		Line() { text_buf.instantiate(); }