DOCX is safer than PDF for ATS. Most systems parse Word documents accurately. PDFs work but can cause issues if they're scanned images rather than text-based.
If you submit PDF, ensure it's text-selectable. Test by copying text from it. If copy-paste works, ATS can read it.