The difference between what happens when in editor mode and what happens in Action Chains, is caused by the fact the calibre parses html differently when in editor mode. When in editor mode, calibre will remove some meta tags, that are otherwise not deleted. I don't know the exact reasons for why calibre does this, but I trust that Kovid has done this for good reasons.
It is trivial (in terms of code) to change the plugin to have it perform exactly the same in both modes. But I don't know if this would break some other action or functionality of the plugin. What is not trivial, however, is repeating all the hours of testing that has gone into the plugin to ensure nothing else breaks because of this change, which is not something I am prepared to do.
Anyway, The difference in output is not significant (some meta tags and whitespace) and does not affect the end result. The bottom line is that the html files are beautified and fixed in both modes. If you are bent on having them exactly the same,
try the chain attached below, which deletes the culprit meta tags. If you are still not getting the result you want, there is nothing to be done as the changes required for this require huge amount of testing that I am not ready to do.