the issue with the mesh leaving the capsule is probably due to the animation not being stationary. you will want to enable root motion in the animation so that the root of the character moves based on the animation. in a normal animation the mesh stays in one place while playing the animation and the movement is based on the capsules location. the animation your using is different and you need to base the character location on the animation rather than the opposite way, its actually pretty common and you just need to check a box and it should work.