A simple approach is to modify the direction vector before applying it to the velocity like so:
func player_movement():
var move_direction := Input.get_vector("Left", "Right", "Up", "Down")
if abs(move_direction.x) > abs(move_direction.y):
move_direction.y = 0
else:
move_direction.x = 0
velocity = move_direction * Speed
move_and_slide()