Shouldn’t you be able to decide how to transition from velocity → no velocity in the animation state setup?
Of course the velocity will be 0 instantly after you hit something. You can’t smooth hitting a wall out unless you start slowing down the character before it hits the wall because you obviously mustn’t move into the wall.
This is not something you change in the gameplay part (aka movement functionality) but rather in your animation setup.