Hello,
Sorry but we don't know what could be happening on your server.
You'd need to check your server logs, add the mime/type for DOCX files in your server config:
application/vnd.openxmlformats-officedocument.wordprocessingml.document
and use the create createDocx standalone, and then write a custom download method. The included method may not work in some specific cases.
Regards.