New Input System Flicker problem (if vector is not zero)

Hello, I wrote a player movement using the new input system, I want the actions not to be performed when the key is not pressed in the update. But this causes a flicker, my character still moves after the key is pressed, what could be the reason for this?

98eihf

As you can see, even if I release the key, the character moves.

Before the return set the velocity to vector3.zero.
Right now the velocity is a positive value, so it will slow down by the amount of drag you set (like when you push a ball it will continue if you stop adding force). If you set the vel to 0 it will instantly stop

Thank you.