The moon roof has 4 drain tubes. The rear 2 run under the headliner and through the c pillars and trunk. The front ones run behind the a pillars. They sometimes shrink with age or clog.
I had the same issue but my trunk was filling with water as it was the rear ones...
I didn't want to bother installing a new tube, so I adjusted the moon roof (4 bolts behind long plastic pull out sight shield that pulls out from the front side of the moon roof revealing 2 screws on each side.) loosen all 4 bolts, press the moon roof up as far as it will go and tighten the bolts while maintaining pressure.