### 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
for (const KeyValue<MessageType, LogFilter *> &E : type_filter_map) {
		E.value->set_message_count(0);
	}
}
EditorLog::EditorLog() {
	save_state_timer = memnew(Timer);
	save_state_timer->set_wait_time(2);
	save_state_timer->set_one_shot(true);
	save_state_timer->connect("timeout", callable_mp(this, &EditorLog::_save_state));
	add_child(save_state_timer);
	HBoxContainer *hb = this;
	VBoxContainer *vb_left = memnew(VBoxContainer);
	vb_left->set_custom_minimum_size(Size2(0, 180) * EDSCALE);
	vb_left->set_v_size_flags(SIZE_EXPAND_FILL);
	vb_left->set_h_size_flags(SIZE_EXPAND_FILL);
	hb->add_child(vb_left);
	
	log = memnew(RichTextLabel);
	log->set_threaded(true);
	log->set_use_bbcode(true);
	log->set_scroll_follow(true);
	log->set_selection_enabled(true);
	log->set_context_menu_enabled(true);
	log->set_focus_mode(FOCUS_CLICK);
	log->set_v_size_flags(SIZE_EXPAND_FILL);
	log->set_h_size_flags(SIZE_EXPAND_FILL);
	log->set_deselect_on_focus_loss_enabled(false);
	vb_left->add_child(log);