Then either the Mermaid team should fix this, or you should modify layouts/_default/_markup/render-codeblock-mermaid.html to do some sort of search/replace. For example:
<pre class="mermaid">
{{- .Inner | replaceRE `\(` "#40;" | replaceRE `\)` "#41;" | safeHTML }}
</pre>
{{ .Page.Store.Set "hasMermaid" true }}
But I have no idea if that breaks any other diagrams.