Hello,
If you need to use ob_clean to get a correct DOCX file, it's because your server is adding some string into it; maybe some notice, warning or header. Although you can use this function to solve it, we recommend you to remove that line, check your server logs, edit the DOCX using an HEX editor and check its content.
Regards.