I have the following graph:
digraph D {
node [
      fontname = "Arial"
      fontsize = 11
      shape = "record"
      ]
A [ label = "my_A" ]
B [ label = "my_B" ]
subgraph cluster_mg {
        label = "Main Group";
        penwidth = 1
        color = "black"
        subgraph cluster_subgroup1 {
                color = "black";
                style = dashed;
                label = "Subgroup 1"
                A
        }
        subgraph cluster_subgroup2 {
                color = "white"
                penwidth = 0;
                label = "Subgroup 2"
                B
        }
}
#A -> B
#{ rank=same A B }
}
With the last two lines commented out, it produces this figure:
I want to add an arrow from my_A to my_B. When I do this (by uncommenting the first commented out line) my_A and my_B are placed vertically instead of horizontally. When I set their rank to be the same, I lose the dashed outline. How can I construct the same figure as displayed here, but with a line from my_A to my_B?
Also, how can I put my_A on the left and my_B on the right?

 
    