This has been irritating me for a while and I finally took time out last week to contact the apple support and did some analysis of my own.
This is what I found. I would love if you guys also can try this.
Conclusion: The photo actually does not change, it's just the brightness of the screen which adjusts automatically to make the pic look brighter. It does that a lot initially and later stops getting brighter. Eventually the photo itself is dull, you can check that by seeing the pic on a computer.
How to check that: Take a photo and transfer it immediately, then wait for a few minutes or hours until you see the problem again (photo becomes dull). Now transfer the pic to your computer again and compare it with the one you transferred earlier. You will notice that both the pics are the same and there is no difference. Bad news, the original photo is dull.
Worst part is, by default the photo is dull, you know this as soon as you look it up on a computer. Plus one good way is to compare with similar photo taken from another phone, especially try to capture something white or with white background. I compared with Samsung note 10 plus and white is actually white in Samsung, in iPhone 12 pro max, it looks more like off white or with dull lighting. Only some photos taken in bright sunlight look good. I even tried increasing the exposure and everything before taking the pic, but even then Samsung note 10 plus takes better and brighter pics.
I noticed that after a while after taking the pic, the preview (which shows all the pics in the gallery) seemed dull, and as soon as I open the phot it became dull, you can see the transition when you click back on the full screen photo and it goes back to the preview. the screen's brightness plays with our minds and lets us think that the brightness and exposure is fine, so we end up not even changing the exposure and all (which we ideally should not have to if the phone took better pics in the 1st place)
This is actually very unacceptable for a phone which is advertised as the best camera photo. Many other phones can take a better photo, and you can see the real difference when you put them together and compare them on a same screen like on a laptop.
So after discussion with a senior analyst in apple and the response that he received from the engineers, they said that the photo itself does not change and there is no problem with the hardware or software and the phone is functioning AS EXPECTED and it has a NORMAL BEHAVIOUR.
They only thing they suggested me is to go to apple.com/feedback and provide a feedback so that they can improve on it.