Kinda Confused

Ok so basically when I start up the game everythings normal but if I move or jump or do anything my charater shrinks to like 1 or -1 I forgot which one. Also the ground boxes are a bit weird but I’m pretty sure thats just from my awful design
Heres my code.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class playermovement : MonoBehaviour {
    public float movementSpeed;
    public Rigidbody2D rb;

    public Animator anim;

    public float jumpForce = 20f;
    public Transform Player;
    public LayerMask GroundLayers;

    float mx;

    private void Update() {
        mx = Input.GetAxisRaw("Horizontal");

        if (Input.GetButtonDown("Jump") && IsGrounded()) {
            Jump();
        }

        if (Mathf.Abs(mx) > 0.05f) {
            anim.SetBool("isrunning", true);
        } else {
            anim.SetBool("isrunning", false);
        }

        if (mx > 0f) {
            transform.localScale = new Vector3(1f, 1f, 1f);
        } else if (mx < 0f) {
            transform.localScale = new Vector3(-1f, 1f, 1f);
        }

        anim.SetBool("IsGrounded", IsGrounded());
    }

    private void FixedUpdate() {
        Vector2 movement = new Vector2(mx * movementSpeed, rb.velocity.y);

        rb.velocity = movement;
    }

    void Jump() {
        Vector2 movement = new Vector2(rb.velocity.x, jumpForce);

        rb.velocity = movement;
    }
    public bool IsGrounded() {
        Collider2D GroundCheck = Physics2D.OverlapCircle(Player.position, 2f, GroundLayers);

        if (GroundCheck != null) {
            return true;
        }

        return false;           
    }
}

What is confusing ? what is your expected outcome ?
lines 30 - 34 are settings the scale which is why it is shrinking.

What @LethalInjection said, and if your goal is to flip a character with a scale of more than 1,1,1, then you need to set the scale to what it actually is, or do it dynamically:

    void Update()
    {
        if (mx > 0f)
        {
            transform.localScale = new Vector3(Mathf.Abs(transform.localScale.x), transform.localScale.y, transform.localScale.z);
        }
        else if (mx < 0f)
        {
            transform.localScale = new Vector3(-Mathf.Abs(transform.localScale.x), transform.localScale.y, transform.localScale.z);
        }
    }

Thank ya’ll so much