Most wallpapers will make the clock white but a completely white wallpaper makes the clock black so it's readable. However trying to use a wallpaper with a white top will keep the clock white and unreadable. This is a very exaggerated example:
https://i.imgur.com/mDx70j7.png

I'm not sure how the colors are sampled from the wallpaper, but they should only be sampled from the top rather than the rest of the image.
I doubt this issue is isolated to the Pixel 7 so I tagged as general.