Ragdoll AI rotation towards target?

I’m trying to make an AI, so it detects when the player is within range, to face towards him.
Below is the script that I’m using, but when the ragdoll reaches > 90 && < 270 (At the back of the transform and sides), it doesn’t rotate to those angles, only 0 - 90 && 270 - 360 (At the front and sides) . I tried to Quaternion. Inverse it, but no luck.

Does anyone have a solution?

void EnemyRotation()
lookingAtPlayer = enemy.GetPlayerSeen();

    if (!lookingAtPlayer)
        // Atached to the root from a different script
       //public Vector3 GetDirection()
          // return (player.position - transform.position).normalized;

        var lookPos = enemy.GetDirection();
        var rotation = Quaternion.LookRotation(lookPos);

        APR_Parts[0].GetComponent<ConfigurableJoint>().targetRotation =
                new Quaternion(rotation.x, rotation.y, rotation.z, rotation.w), Time.deltaTime * turnSpeed);

        Debug.Log("Looking for the player!");
        Debug.Log("Found player!");

I’m making a game with 2d ragdolls right now, so I can actually kind of help you from the top of my head. Maybe just try rotating the body like so

bodyRigbody.MoveRotation(Quaternion.Slerp(targetRot, speed * Time.deltaTime);

Not sure if this will work, but if it doesn’t let me know and I will try to help

APR_Parts[0] is the root bone in the ragdoll just to clarify