Bone Evaluation Broken with FaceUp Bone

Hello!
I ran into a weird bug. When a bone is strictly facing up and the animation keeps it facing up, its own position evaluation and some of these children’s position evaluation is broken.

BrokenFaceUpBone-ezgif.com-optimize

I checked the FBX files and all is fine.
NotBrokenFaceUpBone-ezgif.com-optimize

The problem is with the import into Unreal Engine. It looks like Unreal produces a gimbal lock on import ?

These are the values used in blender.
Bone head: (8.601676881880849e-08, 3.524153232574463, 164.54409790039062)
Bone tail: (8.601676881880849e-08, 3.524153232574463, 164.54409790039062)
Bone rotation at frame 0: (0.0, 0.0, 0.0)
Bone rotation at frame 5: (0.0, 10.0, 0.0)
Bone rotation at frame 10: (10.0, 10.0, 00.0)
Bone rotation at frame 15: (10.0, 10.0, 10.0)

Do you have any ideas of what could cause this?

I found that:
With Blender I use an modifier to copy the bone transformation of another bone. The precision is not absolute and this creates a very small shift in the bone scale.

That small shift make the animation export break with Unreal.

Matrix World scale (Pelvis): x=1.00000000000000000000000000000000000000000000000000, y=0.99999994039535522460937500000000000000000000000000, z=0.99999040365219116210937500000000000000000000000000

Matrix World scale (Pelvis): x=1.00000000000000000000000000000000000000000000000000, y=0.99999994039535522460937500000000000000000000000000, z=1.00000000000000000000000000000000000000000000000000

I do not understand why that small shift break the animation import.