This bug is so annoying… You open an HTML file in DTTG4 simply for viewing, without any editing, and it syncs back to your Mac as a formatted note. Nothing changes to the file itself, as verified by MD5, and you can revert it back to HTML using the Convert > To HTML command in DEVONthink for macOS (it will create a HTML copy of file). Seems like this command just unchecks some internal flag in your database. If you regularly view HTML files on your iPhone and also frequently edit their source code on your Mac, this creates an unnecessary reverting chore in order to enable Side-by-Side editing in DEVONthink.
Also, if you add an HTML file to DTTG4 from any source, it will also end up on your Mac as a formatted note, even if you haven’t open it DTTG4 for viewing.