How to add space between clusters

I’m making dot graphs which has some clusters I’m drawing with dashed outlines. The clusters are being drawn without any space between them, with the dashed edges on top of each other. How can I add some horizontal space between clusters? I’ve gone through the “properties” section of the docs and didn’t find anything – the “margin” attribute on a cluster seems to control space within the cluster rather than outside it.

temp.dot

Expand for DOT code
digraph "G" { 
  bgcolor = "lightgray"
  margin = "0"
  pad = "0.25"
  nodesep = "0.3"
  ranksep = "0.4"
  newrank = "true"
  labeljust = "r"
  fontname = "DejaVu Sans Mono Book"
  edge [fontname="DejaVu Sans Bold", arrowhead="normal", arrowsize="1", fontsize="8"]
  node [fontname="DejaVu Sans Bold", margin="0.1,0.1", shape="box", bgcolor="white", height="0.2", width="0.2", color="gray60", penwidth="2"]
  subgraph "cluster_ctx...1" { 
    label = ""
    shape = "box"
    style = "dashed,rounded"
    margin = "12"
    penwidth = "4"
    color = "gray70"
    "..1" [label="await_", style="filled,rounded", color="gray70"]
    "..1.then" [label="then", style="filled,rounded", color="gray70"]
  }
  "..1.then.1.ifTrue" [label="p2", fontname="DejaVu Sans Mono Bold", style="filled", fontcolor="lightgreen", color="gray20"]
  subgraph "cluster_ctx...1.then.1.ifTrue.1" { 
    label = ""
    shape = "box"
    style = "dashed,rounded"
    margin = "12"
    penwidth = "4"
    color = "gray70"
    "..1.then.1.ifTrue.1" [label="await_", style="filled,rounded", color="gray70"]
    "..1.then.1.ifTrue.1.then" [label="then", style="filled,rounded", color="gray70"]
  }
  subgraph "cluster_ctx...1.then.1.ifTrue.1.then.1" { 
    label = ""
    shape = "box"
    style = "dashed,rounded"
    margin = "12"
    penwidth = "4"
    color = "gray70"
    "..1.then.1" [label="andLeft", style="filled,rounded", color="gray70"]
    "..1.then.1.ifTrue.1.then.1" [label="andRight", style="filled,rounded", color="gray70"]
  }
  subgraph "cluster_ctx...1.then.2" { 
    label = ""
    shape = "box"
    style = "dashed,rounded"
    margin = "12"
    penwidth = "4"
    color = "gray70"
    "..1.then.1.ifTrue.1.then.stop" [label="stop_", style="filled,rounded", color="gray70"]
    "..1.then.2" [label="return_", style="filled,rounded", color="gray70"]
  }
  subgraph "cluster_ctx...1.then.2.return.resolve_" { 
    label = ""
    shape = "box"
    style = "dashed,rounded"
    margin = "12"
    penwidth = "4"
    color = "gray70"
    "..1.then.1.ifTrue.1.then.stop2.reject_" [label="", style="filled,rounded", color="gray70"]
    "..1.then.2.return.resolve_" [label="", style="filled,rounded", color="gray70"]
  }
  subgraph "cluster_ctx.RETURN" { 
    label = ""
    shape = "box"
    style = "dashed,rounded"
    margin = "12"
    penwidth = "4"
    color = "gray70"
    "RETURN" [label="resolve", style="filled,rounded", color="gray70", shape="doubleoctagon", color="darkblue", style="filled", fontcolor="lightblue", margin="0,0", fixedsize="false"]
    "STOP" [label="reject", style="filled,rounded", color="gray70", shape="doubleoctagon", color="darkred", style="filled", fontcolor="pink", margin="0,0", fixedsize="false"]
  }
  "START" [label="p1", fontname="DejaVu Sans Mono Bold", style="filled", fontcolor="lightgreen", color="gray20", shape="doubleoctagon", color="darkgreen", style="filled", fontcolor="lightgreen", margin="0,0", fixedsize="false"]
  "..1" -> "..1.then" [taillabel="", color="gray70", penwidth="2", headlabel="⏸", labelangle="0", fontsize="15", arrowhead="odot", arrowsize="2.25", labeldistance="0.8", fontcolor="blue"]
  "..1.then" -> "..1.then.1" [taillabel="", penwidth="2", arrowhead="normal"]
  "..1.then" -> "..1.then.1.ifTrue.1.then.stop" [taillabel="stop", penwidth="2", arrowhead="normal"]
  "..1.then.1" -> "..1.then.1.ifTrue" [taillabel="ifTrue", color="gray70", penwidth="2"]
  "..1.then.1" -> "..1.then.2" [taillabel="", penwidth="2", arrowhead="normal"]
  "..1.then.1.ifTrue" -> "..1.then.1.ifTrue.1" [taillabel="", penwidth="2", arrowhead="normal"]
  "..1.then.1.ifTrue.1" -> "..1.then.1.ifTrue.1.then" [taillabel="", color="gray70", penwidth="2", headlabel="⏸", labelangle="0", fontsize="15", arrowhead="odot", arrowsize="2.25", labeldistance="0.8", fontcolor="blue"]
  "..1.then.1.ifTrue.1.then" -> "..1.then.1.ifTrue.1.then.1" [taillabel="", penwidth="2", arrowhead="normal"]
  "..1.then.1.ifTrue.1.then" -> "..1.then.1.ifTrue.1.then.stop" [taillabel="stop", penwidth="2", arrowhead="normal"]
  "..1.then.1.ifTrue.1.then.1" -> "..1.then.2" [taillabel="", penwidth="2", arrowhead="normal"]
  "..1.then.1.ifTrue.1.then.stop" -> "STOP" [taillabel="", penwidth="2", arrowhead="normal"]
  "..1.then.2" -> "RETURN" [taillabel="", penwidth="2", arrowhead="normal"]
  "RETURN" -> "..1.then.2.return.resolve_" [taillabel="", penwidth="2", arrowhead="normal"]
  "START" -> "..1" [taillabel="", penwidth="2", arrowhead="normal"]
  "STOP" -> "..1.then.1.ifTrue.1.then.stop2.reject_" [taillabel="", penwidth="2", arrowhead="normal"]
}

Have you tried adding nodesep and ranksep?

You have encountered a bug.
The documentation does not identify any attribute that changes the space between adjacent clusters - margin as a graph attribute (margin | Graphviz) should not affect this.
Testing (not code reading) tells me that leaving margin (as a graph attribute) unset or setting margin=.25 works fine. But, setting margin=0 or margin=2 produces the bad result you are encountering.
I believe that dot sets the space between adjacent clusters to 8 points. If this works for you (with margin left at default or set to a small number), OK. If you want a larger space between adjacent clusters, it can be done by wrapping invisible clusters around all your clusters - increasing the space 8 points at a time.

Separation between adjacent clusters is set here: lib/dotgen/position.c · main · graphviz / graphviz · GitLab

A nice small coding project would be to introduce an attribute to optionally override this.