This is very well known problem. Because since Qt5 QDomDocument uses QHash attributes inside of XML has different order each time we save file. We managed to disable this behaviour by turn off hash seed, but this works only for local run. Sharing files between machines still doesn't work.
The solution could be to use QXmlStreamWriter class instead. But this will require full rewrite.