Code formatting is different with 4 spaces than 3 backticks

Here is the same line of code twice, first enclosed in triple backticks (```) then with no backticks but instead four spaces at the beginning of the line:

/// MARK: Why is this not identical?
/// MARK: Why is this not identical?

I think it has to do with Discourse settings:

https://meta.discourse.org/t/confused-about-highlighting-in-code-blocks/8708