Aligning these 2 subgraphs horizontally?

I’ve been trying get two graphs aligned. I did check this post.

This is the code I’ve played with:

digraph {
    graph [
     nodesep=1,
     ranksep=0.9, 
     compound=true,
     newrank=true
    ];
    rankdir=LR;
    node [shape=record, fontname="Helvetica"];

    subgraph cluster_dev1 {
        label="Device 1";
        style=rounded;
        color=gray50;
        margin=12;
        struct1 [
            label="<port1>Tx|<port2>Rx";
        ];
    }

    subgraph cluster_dev2 {
        label="Device 2";
        style=rounded;
        color=gray50;
        margin=12;
        struct2 [
            label="<port1>Tx|<port2>Rx";
        ];
    }
    struct1:port1 -> struct2:port2;
    struct2:port1 -> struct1:port2;
    {rank=same struct1 struct2 }
}

And here is a demo

Any help? I want the subgraphs at the same distance from the top margin / horizontally aligned.

Manage to do it using a different syntax:

digraph {
	fontname="Helvetica,Arial,sans-serif"
    graph [
     nodesep=1,
     ranksep=0.9, 
     compound=true,
     newrank=true
    ];
    rankdir=TB;
    node [shape=record fontname="Helvetica,Arial,sans-serif" style="filled" fillcolor="lightblue"];

    subgraph cluster_dev1 {
        label="UART 1";
        style="rounded,filled";
        fillcolor=gray90;
        margin=12;
        
        Tx1
        Rx1
    }

    subgraph cluster_dev2 {
        label="UART 2";
        style="rounded,filled";
        fillcolor=gray90;
        margin=12;
        Tx2
        Rx2
    }

    Tx1 -> Rx2
    Tx2 -> Rx1;
}

Renders to