There is a problem with iOS simulators when running some OpenGL commands; for you to know, using simulator version 17.2 for iPhone 15 pro seems ok, but 17.4 or 17.5 fails. here are more details of what is happening to you
Please login to see this link.
Thanks for the information!
By changing the simulator version to 17.2, the problem is no longer present.