Only the password required to open the file is taken into account. If the PDF file requires a password to modify the protection features, this PDF file is not considered as being protected (PDFIsProtected will return False).