Hello,
It seems you are applying htmlentities (https://www.php.net/manual/es/function.htmlentities.php) or a similar function to the HTML content before adding it with embedHTML, so the tags are added instead of being transformed. If you are sending HTML entities you may need to use html_entity_decode (https://www.php.net/manual/en/function.html-entity-decode.php) to get the correct HTML to transform it.
On https://www.phpdocx.com/documentation/cookbook/wysiwyg-editor there's a sample using the output of CKEditor. It seems the problem comes from how your code is sending the HTML content to PHP.
We recommend you to check the HTML content you are adding, the setup of CKEditor and how you are sending the HTML to PHP (using AJAX or any other approach). Please note that this is not a phpdocx problem but how the HTML content to be transformed is being sent to phpdocx.
Regards.