Netlify possibly stripping out <svg> with display: none; inline styles?

I declared a couple of <svg style="display: none">'s in my website so I can refer to them later in the same page. It works fine when I run it locally. However when my site is deployed to Netlify the <svg> declarations get stripped from the page so the references to the svg don’t show up at all. I do have asset optimization turned on but have it also turned off for CSS, JS, and images. I am also using vanilla HTML and confirm that the svg declarations are in my source repo of the deployed commit. Any ideas why my svg’s are getting stripped out - I’m assuming it has to do because they are declared with the style="display: none", but is there any way to workaround that?


Can you please share the site in question?
Can you also share the repository you are deploying from?