Character speeds up for no reason

Godot Version

`4.2

Question

I am new and just applied a basic movement script, but it seems to speed up when the input keys would usually start repeating their character.

Here is the code:
func _physics_process(delta):
var input_direction = Input.get_vector(“ui_left”, “ui_right”, “ui_up”, “ui_down”)

	velocity = input_direction * SPEED
	velocity.x = move_toward(velocity.x,0,delta)
	velocity.y =move_toward(velocity.y,0,delta)
	move_and_slide()

Is that the only code?

You can remove these two lines, though I don’t think they do any harm they certainly don’t do much in general. Everything else is very standard and should work perfectly.