I think it could also be the if
statement in the return that could be causing the issue. I don't remember right off how ternary if
statements work in Godot, but I remember they are kinda strange. If adding the actions in the project settings or through code do not fix the issue, I would see something like the code below works instead.
func get_direction() -> Vector2:
var y_pos = 1.0
if Input.is_action_just_pressed("jump") and is_on_floor():
y_pos = -1.0
return Vector2(
Input.get_action_strength("move_right") - Input.get_action_strength("move_left"),
y_pos
)