Support vector-effect="non-scaling-stroke"
It's a widely supported property. The spec is here.
Sample SVG:
<svg viewBox="-64 -64 256 256" style="transform: scale(2, 1)">
<rect width="64" height="64" stroke="orange" fill="blue" stroke-width="10" vector-effect="non-scaling-stroke" />
</svg>