Not a bug, what’s inside the Mermaid block will only be parsed by Mermaid. Just like if you have [[link]]
in LaTeX that won’t work too.
Here’s a workaround that you can take a look: Obsidian Links in Mermaid
Please file a feature request if you feel like it’s important.