I encountered a similar problem with MathML in Markdown suddenly breaking after upgrading Ghost back when I was using it, and I’m seeing what appears to be the same cause in your screenshot: the HTML block contains blank lines.
I believe this is fine in vanilla Markdown, but some Markdown variants like CommonMark might not convert this as intended due to them using different rules to determine when an HTML block starts and ends.
As such, I suspect that your local Markdown interpreter uses a different Markdown flavor than the one used for your final build. Can you verify?