/Engine/Source/Runtime/Engine/Public/Animation/BoneSocketReference.h
This will return the compact pose bone index that matters if you're using socket, it will return socket's related joint's compact pose index
[FCompactPoseBoneIndex](API\Runtime\AnimationCore\FCompactPoseBoneIndex) GetCompactPoseBoneIndex() const