Make my character move with same animation all directions

Hello im a newbie at scripting, I write this code to make a simple character,
The char is moving in the 4 directions but only play the walk animation with W key

    float h = Input.GetAxisRaw("Horizontal");
    float v = Input.GetAxisRaw("Vertical");

    anim.SetFloat("Speed", v);

    movement = new Vector3(h, 0f, v);

    if (movement != Vector3.zero)
        transform.rotation = Quaternion.LookRotation(movement.normalized);

    transform.Translate(movement * moveSpeed * Time.deltaTime, Space.World);

It is caused by your transition that you set in animator. I’m pretty sure its transition between Idle and Walk when Speed is > 0 and Speed parameter is set by vertical input which is = 1 when you press W and -1 if you press S. For same animation in every direction it’s better to use bool parameter instead of float, you might try something like this

         float h = Input.GetAxisRaw("Horizontal");
         float v = Input.GetAxisRaw("Vertical");
         bool moving;
         movement = new Vector3(h, 0f, v);
         if (movement != Vector3.zero)
{
             transform.rotation = Quaternion.LookRotation(movement.normalized);
             moving = true;
}

else {
        moving = false;
}

         transform.Translate(movement * moveSpeed * Time.deltaTime, Space.World);
         anim.SetBool("Moving", moving);