Get Socket Transform returns correct location but wrong rotations. How do i get the correct rotations?

I have this node, and it returns the correct locations of the bones in space, but not the correct locations. I can’t figure out why and how to fix this.

image

could you fix this issue ?