If it is Giray, the only successful way is to remove the screen, clean the rubber if it's in good enough condition, treat any rust around the opening and refit the screen with sealant both around the glass and around the correct part of the body aperture. Sounds a lot but it's not too bad a job. The water often gets in at the corners of the glass where the rubber on the inside is lower than the rubber on the outside. Blocked or broken sunroof drains can cause water ingress too but this is easy to sort and it's rare the drains get broken or disconnected.