Hello,
We have run a script that uses ten different templates to generate several outputs, and in all cases, all placeholders are replaced correctly.
There's no need to unset or set to null the variables, CreateDocxFromTemplate resets the needed variables automatically.
Please send to contact[at]phpdocx.com the most simple script that illustrates your issue (without doing external connections such as databases or webservices) and the templates you are using and we'll check them.
Regards.