We’ve talked about this kind of problem several times before. If results differ between -Tsvg and -Tpng, then the problem is usually that SVG generated by the Graphviz default SVG driver is underspecified. If fonts are not embedded in SVG, there’s really no way of knowing if graphviz and the downstream renderer are loading the same font for “Times-Roman”. So, use -Tsvg:cairo (or -Tsvg:quartz on a Mac) to get embedded fonts. The SVG is much more complicated but also much more likely to render the same everywhere. This problem is a little like noticing that web pages can sometimes look different in Microsoft Edge, Safari, Firefox or Chrome.
The sizing and layout of text in Graphviz doesn’t depend on the selection of output renderer. (Depending how graphviz was built, the preference is still to use cairopango at layout time to resolve fonts and to get the size of text, but if not available Graphviz could fall back to freetype/fontconfig/libgd. Run with -v to see what is happening.) An advantage of the simple SVG driver is that the output is more easily parsable by downstream tools, and we were able to implement features not in the cairopango API.