Sunroofs have a pan around them that catch water and have drain hoses to get it out of there. They say all sunroofs leak and when you get water in the car it's because those drain hoses are clogged.

We've had a few cars with sunroofs in the family and only one ever leaked. It went back to the dealer a few times to be fixed. I think the entire sunroof was replaced once, the healiner once from staining. The new one stained again but they cleaned it. Personally I hate the things. When the shade is open the sun thru them heats up the car, I hate the draft and wind noise when they're open when you're driving. There's no point to leave them open when the car is parked because a bird can [censored] in it and if it's vented it doesn't do anything when that chunk of extra glass is still letting the sun in. Then you have that leak potential.