An example of the bug is shown in the screenshot below, which occurred while editing this answer:
The issue goes away if a trailing line break is added.
A minimal reproduction of the bug:
- Ask on Code Golf
"```\ncode\n\nmore\n```"so the input field looks like:
more code ```