I Nathan I don't understand why you use velocity.y = move_and_slide_with_snap(...).y,
and not velocity = move_and_slide_with_snap(...)?
I tried the two and didn't notice any changing within the player movement.
With the project's code, if I recall correctly, your suggestion would make enemies get stuck on walls, as they rely on their current velocity to change direction. Only resetting the Y velocity prevents that bug.
Thank you Nathan! I tested with the enemy and yes it is exactly as you said!