Linear Velocity and gravity

I’m following a Unity tutorial for a platform game and I’ve found that they use blend trees to change animation based on y velocity.

image

This could work fine but I’ve found that the vertical velocity is very unstable, so I’m assuming that it doesn’t work at all like Unity does, it can be positive or negative also causing multiple contact events even when the player is not moving.

2023-03-08 11.15.46

My question, is there a way to mitigate this ?