This one thing is kind of surprising for me and I don't get why it happens.
When I run a scaling matrix on a shape or a group of shapes, the stroke width is set to 1000pts after transformation... whether I scale up or down, whatever the original width of the stroke. This makes no sense to me...
If you want to try for yourself and see if does the same, here's my test script line (whatever the scaling number, the issue happens):
CarlosCanto • Adobe Community Professional, Aug 03, 2020
changeLineWidths is optional but I think if not provided, it defaults to 100.
if you don't want to scale strokes, use a value of 1, otherwise calculate the exact value.
var scaleX = 200;
var scaleY = 200;
var changeLineWidths = ((scaleX+scaleY)/2)/100;
activeDocument.selection.transform(app.getScaleMatrix(scaleX, scaleY), true, true, true, true, changeLineWidths, Transformation.CENTER);