A possible fix is to change velocity.y only when the player is jumping. In player_one.gd / _physics_process():
if not is_on_floor():
apply_gravity(delta)
I highly recommend static typing:
https://docs.godotengine.org/en/4.5/tutorials/scripting/gdscript/static_typing.html
Regarding efficiency, avoid using $JumpTimer or get_node("JumpTimer") in code that's executed frequently:
$JumpTimer.start(1.5)
Instead, save the node reference in a variable:
# at top of script before the functions:
@onready var jump_timer: Timer = $JumpTimer
# in get_input():
jump_timer.start(1.5)
The same applies to $AnimatedSprite2D.
When testing a boolean, you don't need to compare it with true or false.
These are equivalent:
if Input.is_action_just_pressed("jump") and is_on_floor() and can_jump == true:
if Input.is_action_just_pressed("jump") and is_on_floor() and can_jump:
Instead of my_bool == false, you can use not my_bool or !my_bool.