you are calling move and slide only once (in the knockback function), but you need to call it every frame for it to continuously update
like
func _physics_process(delta): move_and_slide()