After changing a word, not clearing but removing a part of it and writting a new one, Word adds some unwanted tags. Phpdocx should clean them, but maybe it's failing.
Please open a template and on document.xml look for the placeholder. If it has tags (like $V<tag></tag>AR$) just remove them before running phpdocx.
Regards. Jorge.