How to make smooth transition between walking and running animations ?

How to make a smooth transition between walking and running animations by pressing the Left Shift key?
At the moment I have an idle, walk and run animation. A smooth transition between idle and walking animation works. But the run animation, which is activated by pressing LShift, is activated sharply, without transition.
By the way, I use Blend Tree to mix animations.

Can you check my animation script and tell me how to fix it? (Explain it as clearly as possible, because I just started learning Unity):

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

public class AnimatorScript : MonoBehaviour
{
    Animator animator;

    void Start()
    {
        animator = GetComponent<Animator>();
    }

    void Update()
    {
        float v = Input.GetAxis("Vertical");
        if(Input.GetKey(KeyCode.LeftShift))
        {
           v *=1f;
        }
        else
        {
            v *= 0.5f;
        }
        animator.SetFloat("vertical", v);

        float h = Input.GetAxis("Horizontal");  
        animator.SetFloat("horizontal", h);

      
    }
}

And of course, here is a screenshot of my Animator:

Hi,
Please don’t start new threads when you are working on the same issue as earlier. If you need to have transition that doesn’t happen instantly, you can always use Mathf.Lerp to do interpolation over time.

How to use Math.Lerp correctly in my case ? Because I tried to use it and failed.

If (!Input) {
     targetSpeed = 0;
} else {
     targetSpeed = walkSpeed;
     if (running) {
          targetSpeed = runSpeed;
     }
}

currentSpeed = mathf.lerp(currentSpeed, targetSpeed, Time)

This is how it should be I think you just have a target value you set to the speed based on what the user does and lerp will smoothly make the currentspeed variable go to that, and you just use currentspeed for moving