A passport's whole job is proving who you are. If your full face is visible for security scanners, wearing religious headwear is totally fine.
Right—the key is consistent ID. If the headwear is part of daily life, the photo may actually make recognition more accurate, as long as the face is clear.