That has to be a recent change, because editing the XML used to cause it to roundtrip through libvirt, which doesn't keep the XML DOM around; anything not in the internal C structs would be removed from the files, including all comments.
Weird, I've done it quite recently on a Debian system and it reformatted & removed everything it doesn't know from the XML. If you Google this, it's a common issue and apparently the reason why the top-level "metadata" tag was added, because that metadata-tag is carried around as DOM, so doesn't get purged.