Great photos! That really highlights the issue. I've got the same problem on my new iPhone12 Pro Max and noticed it when using it as a bedside alarm clock with the brightness turned very low and red clock numbers. I've been doing this for years with my old iPhoneX and it has always worked great - solid perfect black background with red numbers as dim or bright as I prefer. Avoids stray light in the room while sleeping which is disruptive. But my new iPhone12 Pro Max cannot do this because as I dim the screen the supposedly black background gets bright grey, lighting up the room even. Interestingly if I turn the brightness up there is a threshold above which the black background changes back to pure black and works properly! But at that 50%+ brightness the foreground is too bright for my dark room applications so going brighter to avoid grey blacks is not an option. Other people have described the same symptom where they can raise and lower the brightness and find an exact threshold where the grey blacks issue appears and disappears.
Anyway, your photos are a great example. My question for you is was the brightness and room light level the same in these two side by side photos? Judging by the top and bottom borders it looks like the brightness was higher in the left photo that has more grey black issue. If so this is the reverse of what I am seeing because my grey blacks appear with lower brightness setting and disappear as I increase brightness.
I think I'm going to have to exchange my new phone.

But I would prefer for the dust to settle as I just want a fixed one, not to lottery rotate through multiple phones until I happen upon one that works better. Ack! Is there some important difference between exchanging within 30 days vs. using the one year warranty? I don't want a refurbished model or for Apple to take my phone for a week to supposedly fix it. Dang what a pain. My 30 days area almost up so gotta decide what to do.
[EDIT] - By the way, the app I am using is called "Nightstand" which is a great app to use as an alarm clock while sitting on an upright charger. It's also great for testing this particular issue because you can set the foreground clock text to whatever color you want (I use red) and then you can adjust brightness by just sliding your finger up and down vertically. So its super easy to see if the black background is pure black or grey, and to see at exactly what brightness the grey black issue comes and goes.