Hello,
The replace methods allow doing an inline replacement (keep the content of the paragraph but only inline elements are added) or a block replacement (remove the content of the paragraph keeping all new contents), but they don't allow mixing both.
Using DOCXPath (https://www.phpdocx.com/documentation/introduction/docxpath) and WordFragments you can replace an inline placeholder keeping all new contents (block and inline elements), but this task may require closing the previous block tag (w:p) and opening a new one (before and after the previous placeholder) to avoid generating corrupted documents.
As this may be a complex task, if you open a support ticket (https://www.phpdocx.com/support) and attach the template you are using, the dev team will generate a custom script.
Regards.