Not all sunroofs leak. Mine is designed as a sheet of glass that closes flat onto a double set of neoprene gaskets and drainage is via open channels that run from the bottom of the A-pillars to the rear of the hatch. The front and rear edges drain into open transverse channels that run into the aforementioned longitudinal drain channels. In short, all the drainage is open drainage, like rain gutters. None of the drainage is enclosed. And the the neoprene gaskets upon which the glass panel closes are elevated from the bottom of the drain gutters. Leakage is virtually impossible.
I have never had a problem with my sunroof and it is very enjoyable. But I would never order a new car with one although it’s practically free in a used car. I don’t feel it’s worth the $1,000 price tag.