Walking sfx doesn't work properly

When I try walking, my sfx plays severel times while I’m holding the key, and it keeps playing after I release it
My code:

velocity.x = move_toward(velocity.x, direction * SPEED, ACCELERATION * delta)
			if Input.is_action_pressed("right"):
				$Sprite.flip_h = false
				#$Walk.play()
				if is_on_floor():
					$Sprite.play("walking")

Perhaps you have set up automatic loop for this animation

However, there is no problem with your animation, it is a problem with your code.
You should redesign your code using GPT.

How can I disable it?