Problem with twists bone in control rig.

Try to check the primary and secendary Axis in your Basic IK node? Maybe u should maintain these two axis are along with the bone axis in this skeletal mesh