This appears to be a known issue, depending on the color scheme used by iOS 18 for different situations. there is apparently no work around:
https://www.reddit.com/r/iphone/comments/1gginzy/color_inaccuracy_since_ios_18/?rdt=38756
I found this hint:
https://www.reddit.com/r/iOSProgramming/comments/3enzxl/background_color_for_uiview_rendering_slightly/
I tried to change the color scheme, but I did not found the right one (is it sRGB, P3, Device RGB…):