To clarify, it is not that the svg is not loaded as explained by the two links about reflow and SVG properties. The values are behaving as intended as stated in the specs.
A possibility, so that you can replicate the accuracy of setTimeout(1000) taking into account any layout changes due to order of operations and be completely "accurate" instead of depending on non-standard behavior, would be to use MutationObserver or ResizeObserver:
https://developer.mozilla.org/en-US/docs/Web/API/ResizeObserver
In practice, I would recommend just using setTimeout(0) as has been suggested and live with it, because basically all browsers will behave correctly (kind of like how object properties can be traversed in order). You can trigger a reflow whenever you update the layout to make sure those values are correct when they are run, and make sure the SVG stuff runs only after everything has been rendered and you've triggered a layout.
I'm guessing setTimeout(1000) is working for you because some other layout affecting code is running afterwards, just like how the values on these snippets are off by a couple pixels on here when console/preview is hidden/shown due to layout changes when the console/preview div is hidden or shown.
What forces layout/reflow: https://gist.github.com/paulirish/5d52fb081b3570c81e3a
SVG properties: https://trac.webkit.org/wiki/SVG%20properties
According to the document on SVG properties the attributes are lazily calculated until required, and are taken based on a "tear-off" snapshot (x1 is a SVGAnimatedLength object).
Forcing reflow below, which satsifies "until required", so that the percentages are calculated and updated before accessing them.
const serializedSvg = `<svg style="width:100%;height:100%;"">
<line x1="25%" y1="25%" x2="75%" y2="75%" style="stroke: rgb(234, 243, 234);stroke-width: 5;"></line>
</svg>`
const svgDom = new DOMParser().parseFromString(serializedSvg, 'text/html').querySelector('svg')
const container = document.querySelector("#container")
container.appendChild(svgDom)
const lineEl = svgDom.querySelector('line')
// force layout/reflow
lineEl.getBBox()
console.log("fail:" + lineEl.x1.baseVal.value)
setTimeout(() => {
console.log("success:" + lineEl.x1.baseVal.value)
}, 1000)
<div id="container">
</div>