Some AI goes has to go into it because the Moon is always in motion and the Earth is rotating. Unless the phone is in a carrier that’s tracking the sky, there’s going to be some smearing. But, the images iPhones get of the moon are not “sharper than physics would allow,” as might be seen on some android phones.
Everyone in my group of friends took their best pictures of the moon one night. One with a Samsung showed a perfectly exposed photo of the moon against a pitch black sky. Not bad. Another had a moon that was blurrier, but there was much more atmosphere, with the landscape, clouds streaking the sky, altogether more pleasing.