How can I retarget IK Bones in UE4 skeleton to UE5 skeleton?

Hi, I have some two-handed weapon animations authored on the UE4 mannequin that use the ik_hand_gun to attach the weapon. In order to use these animations it’s crucial that the ik_hand_gun bone is retargeted correctly.

When I follow the usual process for retargeting (e.g. via RTG_UE4Manny_UE5Manny or simply by selecting the UE4 animations and choosing Retarget Animations), the retargeted UE5 animations look good except that the ik_hand_gun bone is snapped to the hand_r bone, which is not how it’s animated in the source UE4 animations.

Eventually I worked out that this snapping is due to the pinning that’s applied by the Pin Bone retarget operation in the post-processing phase. Turning this off for the ik_hand_gun bone prevents it from being snapped to hand_r, but then the ik_hand_gun bone no longer animates at all after retargeting. Turning off the Pin Bone operation entirely (i.e. for all bones) results in none of the ik_* bones being animated after retargeting.

So it looks as though retargeting simply ignores the ik_* bones, and they are only animated at all by the post-process pinning. This might be fine if you want your ik_* bones pinned to FK bones, but that doesn’t work for me in the case of these two-handed weapon animations.

What is going on here? Why are IK bones not retargeted? What can I do to retarget them?

Note that due to the specific use case I have, this is something I need to do at the retargeting stage, or by an automated tool or post-process, I can’t rely on resolving it in an animation blueprint.