Quick answer: Godot 4 RichTextLabel mute-style chat showing leftover formatting from previous message? Tag stack not cleared between messages - explicitly reset with clear() before each.
Chat shows '[i]Player muted[/i] previous_message_text'. Italic state leaks from one message to the next.
Clear before append
label.clear()
label.append_text(new_msg)Empty state per message. No leak.
Or build full text
Construct full text in a variable; assign once. Skip incremental appends.
Audit tag balance
Every [tag] needs [/tag]. Mismatched tags leak; the bug class.
“Append doesn't clear state. State is the bug class.”
If your chat uses rich text, the per-message reset is non-optional. Document; reuse.