1. Compile your Tikz code and download the PDF in https://overleaf.com/
  2. Convert the PDF to SVG in https://pdftosvg.com/. Many other websites do not preserve the LaTeX font properly.
  3. Extract and done.