It does work. Putting this in my characters constructor
USkeletalMeshComponent* SMesh = GetMesh();
SMesh->BodyInstance.bLockXRotation = true;
SMesh->BodyInstance.bLockYRotation = true;
SMesh->BodyInstance.bLockZRotation = true;
SMesh->BodyInstance.bLockXTranslation = true;
SMesh->BodyInstance.bLockYTranslation = true;
SMesh->BodyInstance.bLockZTranslation = true;
Give the result