Insert SVG code (not img) in HTML block

I tried this code on a clean install of WordPress

<svg width="100" height="100">
  <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
</svg>

and used ‘Custom HTML’ in Guttenberg in a new post. This worked fine for me.

The same code displayed in the DOM without deleting any tags or adding any

Maybe you cant edit the SVG with HTML because WordpPress doesn’t generate the code until the page is called.