Have you ever looked closely at a car windshield?
The edge of the glass is painted where it is glued to the car but it has these small dots between the clear and painted glass.
These are there for a reason. When the sun hits the glass the painted areas and the clear areas will absorb heat at different rates. This causes the glass to expand and contract differently putting stress on the glass.
These dots help the glass to warm up more evenly over a larger area so the glass does not suffer stress that could cause it to spontaneously explode.
Fun fact: the Tesla cybertruck doesn’t have these.
Yes, the glass will spontaneously crack or explode in the sun.