Character float to the sky when moving to right using 'addforce'

The character has been added box collier 2D and Rigid Body 2D. It will move on a plane like this

The plane has been added box collider 2D

When I press left it works totally fine, but when I press right for a period of time, like 1 second, the character will float to upper and go back down to the plane when ‘right’ button not pressed any more.

//Here is the code
void Update () {

    if (Input.GetAxis(HORISONTAL) < -0.1f)
    {
        transform.localScale = new Vector3(-1, 1, 1);

    }
    if (Input.GetAxis(HORISONTAL) > 0.1f)
    {
        transform.localScale = new Vector3(1, 1, 1);

    }
}

void FixedUpdate()
{
   h = Input.GetAxis(HORISONTAL);

    //move the character
    mushRoomRigid2D.AddForce((Vector2.right * speed) * h);

    //limit the speed of character
    if (mushRoomRigid2D.velocity.x > maxSpeed)
    {
        mushRoomRigid2D.velocity = new Vector2(maxSpeed, mushRoomRigid2D.velocity.x);
    }
    if (mushRoomRigid2D.velocity.x < -maxSpeed)
    {
        mushRoomRigid2D.velocity = new Vector2(-maxSpeed, mushRoomRigid2D.velocity.x);
    }
}

And the settings of the character object:

I believe it is because you set the velocity of x for y. It should be Vector2(x, y) so just change mushRoomRigid2D.velocity.x to mushRoomRigid2D.velocity.y.

 if (mushRoomRigid2D.velocity.x > maxSpeed)
     {
         mushRoomRigid2D.velocity = new Vector2(maxSpeed, mushRoomRigid2D.velocity.y);
     }
     if (mushRoomRigid2D.velocity.x < -maxSpeed)
     {
         mushRoomRigid2D.velocity = new Vector2(-maxSpeed, mushRoomRigid2D.velocity.y);
     }