Mesh deforms when playing animation

Adding some more info

Chains:

Bones hierarchy:

What I also tried:

Starting the chain from pelvis.
Using all possible translation modes at the retargetter.

Nothing helps.