sleeping to false in the input events or use
_physics_process instead of
_integrate_forces to add the force. You could also set
can_sleep for your Player to false. Whatever makes most sense for your game.
This is because, when not moving for a while,
RigidBodies are sleeping. If a body is sleeping,
_integrate_forces won't be called. You can verify this by looking at the remote scene tree and watch the
sleeping property change from false to true once the player stops. In fact, if you wait long enough before pressing up or down, it won't even move on the first key press. This is intended behavior and helps with performance.