Hello,
There's no known bug in phpdocx. That restriction was added some years ago to avoid generating corrupted DOCX when adding block contents inside other block contents. There's no option in the current release (and previous versions but very old ones that miss styles and may return corrupted documents) to do an inline replacement keeping block contents and styles.
If you want to use the same behaviour than the old phpdocx 4 you can edit CreateDocxFromTemplate.php, go to replaceVariableByHTML method and comment the following line:
$options['type'] = $type;
Commenting the previous line you'll get the same output than phpdocx 4 when doing inline replacements with HTML, but please note that corrupted DOCX and styles missing may happen so we don't recommended that change. A future release of phpdocx will allow adding block tags when doing inline replacements, but it's a work in progress.
Regards.