Hello,
When an inline replacement type is done, block contents are cleaned from the new content (such as paragraphs), and only inline contents are added. To keep block contents from the content to be added when doing the replacements you need to set block as replacement type:
$docx->replaceVariableByHtml($var_name, 'block', $value, $html_options);
On the API documentation page of the method you can find the following information:
type
The substitution type, it can be:
"block": the variable, together with its containing paragraph, is replaced by the HTML content.
"inline": only the variable is replaced by the inline HTML content.
These options and how they work are the same than previous versions.
About the options you have posted they don't handle how to contents are replaced but other options: strictWordStyles (avoid some adding CSS styles, to be used with MS Word custom styles), isFile (to be used if the HTML is a file, not a string), parseDivsAsPs (change default div tags handling). On the previous API page these and other options are detailed.
Please note the linked topic in your post is about an extra space at the beginning of the paragraph, not about replacing placeholders
Regards.