What is happening with my rig?

I’m trying to learn how to rig a custom mesh, and this keeps happening. The skin is bound, the bones are weight painted. I don’t know what is happening.


I went back and tried rigging the whole thing again with Game Rig Tool for Blender to rig it with the UE5 mannequin, and the legs have collapsed. The second pic is brand new skeleton with retargeted animations.