Here in India you don't carry your photo to the passport office. They click your picture onsite and that's what's printed on the passport.
For this reason vain people (like me) may pay a photographer a few dollars to take a photo that is at least well lit and doesn’t appear to have been taken in a morgue.
I would not risk using an AI tool to adjust the photo. If the photo were to fail a facial recognition match against my actual face for some reason I would not enjoy having to explain myself at every border crossing for the next ten years.