Mathf.Clamp still allows rigid body to drift past clamp values

I am trying to clamp the Rigidbody2D position between boundry.xMin and boundry.xMax and boundry.yMin boundry.yMax and assign that clamped value to the transform. This code allows the object to slowly drift out of the boundries I have set. I cannot figure what is wrong with this code. Can someone tell me what is wrong?

void Start()
    rb = GetComponent<Rigidbody2D>();
 //   audioSource = GetComponent<AudioSource>();

void FixedUpdate ()

    if (damage >= 100)
        //Instantiate(explosion, transform.position, transform.rotation);
    float moveHorizontal = Input.GetAxis("Horizontal");
    //float moveHorizontal = Input.acceleration.x;
    if ((rb.position.x >= boundry.xMin) || (rb.position.x <= boundry.xMax))
        Vector2 movement = new Vector2(moveHorizontal, 0);
        rb.AddForce(movement * speed);
    rb.position = new Vector3
        Mathf.Clamp(rb.position.x, boundry.xMin, boundry.xMax),
        Mathf.Clamp(rb.position.y, boundry.yMin, boundry.yMax),


Nevermind. After working implementing my own clamp I found it didn’t work either. The reason was that the Rigidbody 2D cannot have it’s position directly set like I was trying to do. I had to use the method MovePosition in the Rigidbody2D.