The label “Rack marker #” needs to keep its final symbol. In an ATX Markdown heading, a hash preceded by a space can serve as closing syntax. Escape the symbol when it belongs to the title.

Keep the opening hashes and escape the last one

## Rack marker #
## Rack marker \#

In a CommonMark preview, the first line can render as “Rack marker.” The second retains the literal #. The two opening hashes still create a level-two heading.

An unescaped final hash can disappear as closing syntax. An escaped final hash appears in the title.

Illustrated source comparison. Keep the opening ## for the heading level.

Check the heading readers actually see

Open the rendered page and read the end of the heading. If the document has a generated outline, check its displayed title too. An auto-generated anchor may remove punctuation even when the heading itself retains it.

The preview shows Rack marker # as a level-two heading with a visible final hash.

Illustrated check. Inspect the rendered heading and any generated outline.

CommonMark ATX heading rules