Incorrect animation

Hello. A character animation bug occurs in my scene. It consists in moving the character’s legs on the surface, although these movements are not in the original animation. At first I thought the problem was with the import settings. But after looking at the imported animation and comparing it with the same animation on the stage, I realized that the bug occurs in the model, which you can see in the animation gif below:
9722212--1389841--Video_2024-03-24_142607.gif
How can this bug be eliminated?

It turned out that this is the problem. With the Apply Root Motion option of the Animator component disabled, the legs seem to slide on the surface. And all because of the fact that root remains stationary relative to the parent Player object. If you enable Apply Root Motion, the animation starts working correctly and the legs do not slide on the surface. But the root moves relative to the Player. Thus, the character model can move away from the Player, rotate relative to him, and even fall down. Therefore, I have a question: what do game developers usually do in such cases so that the character’s feet do not slide on the surface and he does not move relative to the Player?