Character gets stuck on the ground because of fall animation

We made new movement animations for the game, including double jump and fall animation.

After we implemented the new ones, we started encountering some strange bugs, such as being able to jump endlessly on a kill part that would normally cause death upon contact.

One of these bugs is that your character can sink into the ground while fall animation is still playing.

This usually happens if your character hits a corner of a part while performing a double jump animation, causing them to sink into the ground just as the fall animation begin

Heres a video of the mentioned bug:

Do anyone knows how we can fix this?