In designing similar interfaces, I noticed that our users who were more familiar with physical documents preferred horizontal, while those more familiar with digital interfaces preferred vertical. Tiny sample size though.
If you look into the world of visual effects software, there's a lot of node graphs and it quickly becomes apparent where they fall into place.
Horizontal is for data flow based graphs where nodes pass specific data blocks to each other. This is the norm in shader editors, Maya's node graph, blender geometry nodes, Unity shader graph, Unreal blueprints etc...
Vertical is for pass the world or step based graphs. Each node represents a step, and nodes mutate a combined state that gets passed down. Nuke, Houdini and Katana are like this
the vertical graph has a lot of familiarity with people because it's like a Todo list of steps.
Horizontal graphs are better for data flow because they can have tons of labels that run vertically and get connected to each other.
In some cases you even have hybrid graphs. Where data processing runs horizontally that feed into steps which run vertically. You'll see this in Pixar's Presto, and Unity's Visual Effects graph.