As already reported here, compact mode for Mermaid Gantt charts does not work:
Please add support.
Would be a really useful feature to have for large gantt charts in Obsidian(via Mermaid).