Tesla is an outlier in that the car is designed only with a glass roof. It's not a hole in the existing roof panel like other cars. The lower trim Tesla Y bizarrely has a glass roof that's covered on the inside with a headliner.
Lots of cars have followed Tesla's lead: Ioniq 5, Mach E, etc.
I'm claiming that Tesla is an outlier in that they're not giving a choice. With the Ioniq 5 and Mach E, you can choose whether you want the glass roof or not.
With the cost of the bespoke glass, damage to it basically means the car is guaranteed to be totaled even in a less extreme scenario.