When you publish your Logic App or Power Automate Flow markdown documentation on an Azure DevOps wiki the mermaid diagram does not supports subgraphs.
See https://github.com/MicrosoftDocs/azure-devops-docs/issues/12028
Fix: Change graph to flowchart.