Why is my spline deforming the mesh when it's applied to the chain?

The spline itself seems fine, it’s just that it deforms the mesh when applied to the bones. I made the skeletal mesh in Blender. After importing into UE I used a basic FK control rig at first and it worked, but I switched to spline because I needed smoother animation. This is the first time I’ve ever worked with manual rigging.

First image is before applying, showing that the spline is working. The second is after applying it to the bones. It looks like it’s rotating the mesh on the Y axis or something.

I used Epic’s guide Control Rig Spline Rigging in Unreal Engine | Unreal Engine 5.7 Documentation | Epic Developer Community

EDIT:

After testing a lot, I’m pretty sure that that the X orientations on the mesh and armature are different after importing into UE. The mesh imports okay but the armature bones are oriented 90deg (or -90) on X. If I rotate on import it corrects the armature but then the mesh is 90deg off. I verified they’re the same In blender by checking the origins. I’ve also made sure all transforms are applied. I’m beating my face on my keyboard right now.

In case anyone is going to ask I’ve tried exporting every orientation possible in Blender, including +X forward and +Z up for UE. But that wouldn’t affect the mesh and armature separately. Or would it?