If a §r (reset) formatting code is used in an MOTD anywhere after a line break, it will change the format to the one used in the previous line instead of resetting.
Example:
\u00A7c\u00A7lLine 1\n\u00A76Line \u00A7r2
The expected result would be the text "Line 1" in red (§c) and bold (§l) in the first line, and the text "Line 2" on the second line of the MOTD. Since it is preceded by a §r formatting code, the number 2 should have the default gray color and no text decorations.
In reality, all text following the §r code in the second line uses the formatting that was used at the end of the first line:
[media]This makes it impossible to reset back to default formatting if any formatting was used at the end of the first line.
It looks like this issue exists in all versions since 1.16.
A workaround is to add a §r code at the end of the first line before the line break, so that the first line ends on the default formatting.
I think this is basically the same as in MC-228516. Marking it as relates for now.