How can i fix this ugly deformation
This happens because the Bone.012 has weighting in the body as shown below:



Automatic weighting helps you assign weights but sometimes manual weight adjusments is needed especially when in this case Bone.012 is kind of the closest bone to this area.

To fix this select your armature switch to pose mode then select your mesh and switch to weight painting mode. Then select Bone.012 and set Weight to 0.0 as shown below and paint the areas of the body to remove the weighting from it.



Keep painting with 0 weights until no vertices are assigned to this bone as shown below:



Updated .blend file can be found here: