Here's the deal: Some butcher hacked into the roof of your car and installed one of those horrible aftermarket sunfoof assemblies. They are designed TOTALLY differently than the factory sunroofs, which basically have a high metal ridge that runs around the perimeter of the sunken opening in the roof. This metal ridge is covered with the rubber seal that you have installed on the OUTSIDE of your aftermarket assembly.
The factory assembly has a roof that is prepared for it in that there is a sunken gulley around the metal ridge which receives water and drains it via channels that run down and out inside the car's front roof supports. The glass panel does not seal against the top of the metal roof. As stated, water is allowed to pass by and is drained. The only seal that happens is when the glass roof is squished down against the rubber seal, which, as stated, sits atop the perimeter metal ridge which itself sits inside a sunken recess that is manufactured into the roof of the vehicle from the factory. It's a totally different roof, right from the start. This set-up is leak proof, and will only leak if the water that accumulates from in the gulley cannot be drained away fast enough. Even so, it would take a fair amount of water before it rose above the hight of the metal ridge covered by the rubber seal.
By contrast, your aftermarket assembly consisits of a simple hole being cut out of the roof (no sunken recess, no gulley, no drainage system). Therefore, your glass panel must actually create the seal that keeps water from entering your car. This system is notorious for leaks. It used to be more popular, but I don't see them anymore (thank God).
You have installed that rubber seal that does not belong on your car at all, but rather was made to fit a factory sunroof set up. That's why it sticks up like that. The circumference of a factory sunroof opening looks bigger than what you have, and I bet you had to cut off some extra length on the rubber seal you installed.
The solution is to get the proper rubber seal(s) for your assembly. You will have one that will be attached to the car and one that runs around the perimiter of your glass panel. Any auto glass shop worth its salt should be able to take care of this for you if you can't.
Good luck with it!