Hello,
That feature, keep existing styles when replacing a placeholder by HTML, will be available in phpdocx 10 as HTML Extended option. Please note that HTML Extended is only available in Premium licenses.
As phpdocx 10 hasn't been released yet, it only can be used by users with a Premium license and LUS active; if you upgrade your license and send an e-mail to contact[at]phpdocx.com, the dev team will send you the new classes and samples about how to use it.
Using the current version of replaceVariableByHTML there's no other option than set the font-family and font-size to be used. Using getWordStyles, available since the release of phpdocx 9 in Advanced and Premium licenses,you can get styles from an existing content so they can be added dynamically to the HTML to be added.
Regards.