Yeah I realise that. I've done it many times. The only way is to move the leftmost node so that it aligns with the leftmost node of the other group.
Edit. I think I'm missing something. Are you selecting two groups and running the align action and hoping that the groups align? Or are you dragging groups in an attempt to align them?
I suspect it is the latter. The issue is partly due to the link node being in a half grid position.
Is the confusion because link in nodes, for some reason, snap to half grid positions as well as full grid positions, so even with snap enabled link nodes can be positioned at half grid, so are out of alignment with other nodes?
The group sizing and positioning has nothing to do with hidden ouputs. I am 99% certain it is not taken into account in the group size/layout calculations at all (leaving 1% for error as its a long time since I looked).
The simple fact of the matter is that the leftmost node dictates the left position of the group. The only way to align them (today) is to move the left most nodes.
I dont think that is whats happening. The contents are snapping to the next available full grid line.
NOTE only link nodes are permnited to be snapped/dropped in the half grid position everything else gets snapped to full grid position.
Since the left most node (the link) on a half mark the group is simply redrawn with reference to that.
What moving a grid does is effectively selects and moves all nodes inside, If you have half positioned link node and other nodes in selection, you see the same effect.
If you grab them same 2 nodes by the link node, it is permitted to move half a grid
However, since you are dragging the grid (NOT a link node) you get full step - meaning the half grid aligned link node remains in a half position on the grid!
to be clear - the grid simply redraws around what is inside. If you nudge nodes 1 full grid your group will redraw 1 full grid. Since ONLY link nodes can be snapped at half position, everything inside the grid is moved 1 full grid and the group redraws 1 full grid (leaving the half grid position link still in a half position)
Well. It is the fact you can align the left or right side of a node with the grid. As a collapsed node (like the link node with no label) happens to be 1.5 grid squares means one side or the other will be off-grid, and can thus be moved to align to it.
You can of course change the default grid size to change all this interaction.
Here I select one group, then holding the command-key (or ctrl key on windows), I click on the other two groups so that all three are highlighted. I then use (Alt|Option)-A-L to align to the left.
Actually, I struggle to get nested groups aligned properly. Of course you could force alignment as shown by @gregorius but then all nodes are not aligned to the grid anymore.
My expectation would be that the border of the groups snap to the grid in the same way as the nodes do.