Vim can't highlight Markdown correctly because it does highlighting via regexps. For correct parsing and thus for correct highlighting of Markdown you need a real parser. See e.g. this:
https://github.com/nvim-treesitter/nvim-treesitter
Specifically, for Markdown: https://github.com/ikatyang/tree-sitter-markdown