I think you got it already. There is something strange going on with the rotations. Maybe it has something to do with the order of Euler rotations…
I found an easier example.
This is socket 1 on cube 1:
This is socket 2 on cube 2: Before calling the function they look in the world like this (I added debug coordinate systems with the socket’s transforms):
After the function (e.g. yours like above) they look like this (socket coordinate systems not fully aligned):
But they SHOULD look like this (looks like one coordinate system, because both socket’s coordinate systems have exactly the same origin and rotation):
It makes me crazy that I can’t get this to work