Animation freezes because it's trying to play a different animation

Godot Version

Godot 4

Question

I’m trying to get two different types of animations, one where your strafe slowly, and the other where you strafe quickly. There are two types of animations, Strafe L and R and Strafe Sprint L and R, and two types of inputs. A and D normal and A and D with Shift attached. I think that the normal strafe is trying to play and is freezing the Sprint Strafe animation. I’m not sure how to stop a specific animation from playing but idk if this is common knowledge as I just started getting into Godot so help would be appreciated

Here is my code:
extends Node3D

@onready var animation_player = $AnimationPlayer
var Running = 1
var Crouching = 1

Called when the node enters the scene tree for the first time.

func _ready():
pass # Replace with function body.

Called every frame. ‘delta’ is the elapsed time since the previous frame.

func _process(_delta):
animations()
Run_Set()
print(Running)

func Run_Set():
if Input.is_action_pressed(“Sprint”):
Running = 2
else:
Running = 1

func animations():
if Crouching == 1:
if Running == 2:
if Input.is_action_pressed(“Sprint”):
animation_player.play(“Locomotion-Library/run”)
if Running == 1:
if Input.is_action_pressed(“Sprint Left”):
animation_player.play(“Melee-Library/StrafeRunL”)
$animation_strafel.stop()
if Input.is_action_pressed(“Sprint Right”):
animation_player.play(“Melee-Library/StrafeRunR”)
$animation_strafer.stop()
if Input.is_action_pressed(“ui_left”):
animation_player.play(“Melee-Library/StrafeR”)
if Input.is_action_pressed(“ui_right”):
animation_player.play(“Melee-Library/StrafeR”)
if Input.is_action_pressed(“ui_up”):
animation_player.play(“Locomotion-Library/walk”)
if Input.is_action_pressed(“ui_down”):
animation_player.play(“Locomotion-Library/walk”)
if Input.is_action_pressed(“Crouch”):
Crouching = 2

if Crouching == 2:
	if Input.is_action_pressed("Crouch"):
		pass