### Godot version

4.2.dev1

### System information

Manjaro Linux (DE: Cinnamon v5.8.4) 64 bits

### Issue description

The title already explains it. Take a look at the steps to reproduce below.

### Steps to reproduce

In a GDScript `_ready()` function write this:
```print_rich("[color=red]Red line\n2nd red line[/color]")```

the second line is not red and the output is as follow:
![Capture d’écran du 2023-07-29 05-50-16](https://github.com/godotengine/godot/assets/102065761/554038c6-d128-40c9-8c88-237b44b35b12)

I tested all the the possible BBCodes for the print_rich() method (as stated in the documentation), and of course they all failed.

The RichTextLabel in my projects works as expected.

### Minimal reproduction project

N/A
HBoxContainer *hb_tools2 = memnew(HBoxContainer);
	hb_tools2->set_h_size_flags(SIZE_SHRINK_CENTER);
	vb_right->add_child(hb_tools2);
	
	collapse_button = memnew(Button);
	collapse_button->set_flat(true);
	collapse_button->set_focus_mode(FOCUS_NONE);
	collapse_button->set_tooltip_text(TTR("Collapse duplicate messages into one log entry. Shows number of occurrences."));
	collapse_button->set_toggle_mode(true);
	collapse_button->set_pressed(false);
	collapse_button->connect("toggled", callable_mp(this, &EditorLog::_set_collapse));
	hb_tools2->add_child(collapse_button);
	
	show_search_button = memnew(Button);
	show_search_button->set_flat(true);
	show_search_button->set_focus_mode(FOCUS_NONE);
	show_search_button->set_toggle_mode(true);
	show_search_button->set_pressed(true);
	show_search_button->set_shortcut(ED_SHORTCUT("editor/open_search", TTR("Focus Search/Filter Bar"), KeyModifierMask::CMD_OR_CTRL | Key::F));
	show_search_button->set_shortcut_context(this);
	show_search_button->connect("toggled", callable_mp(this, &EditorLog::_set_search_visible));
	hb_tools2->add_child(show_search_button);
	
	vb_right->add_child(memnew(HSeparator));
	LogFilter *std_filter = memnew(LogFilter(MSG_TYPE_STD));
	std_filter->initialize_button(TTR("Toggle visibility of standard output messages."), callable_mp(this, &EditorLog::_set_filter_active));
	vb_right->add_child(std_filter->toggle_button);
	type_filter_map.insert(MSG_TYPE_STD, std_filter);
	type_filter_map.insert(MSG_TYPE_STD_RICH, std_filter);
	LogFilter *error_filter = memnew(LogFilter(MSG_TYPE_ERROR));