When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
Sounds like there is power being sent to either the sunroof switch or sunroof motor during startup. Try testing them both and see if anything needs replacing.