I made a script in Blender to create a "perfect" deformation.
In the case of a material for clothes: silk, denim, cotton, .... we cannot accept a compression but only a stretching of the material in a more or less open space.
Compression of the material would only occur in a totally enclosed space.
If we are talking about a 2D space, let's accept this is local space, deformation would occur as stretching and folding, not as stretching and compression.
You can see that along the selected edges the length is preserved even after deformation, the stretching takes place along the edges perpendicular to the selected ones, as is normal.