Icon svg export is not the same as Figma design

I have an icon with this structure in Figma (image attached). After exporting it to an SVG format, the form is distorted when implemented in the code.
Any ideas on how to create an icon in Figma that will maintain its intended shape consistently when imported into the code?

Have you tried flattening the frame’s shapes into a single vector before exporting?