Notice in this picture how flush the gasket sits with the body of the car? It is flush all the way around. As is the sunroof when installed.
Then, look at this image. Notice how the black Silicone sealant bonds the gasket to the metal sunroof channel, and then to the roof panel of the car? This eliminates both leaks, and gaps that could create noise from wind passing over the vehicle.
And, last, notice in the two following pictures the actual metal channels that the gasket sits in? I cleaned and repainted a set of spares, I slipped some double sided foam tape underneath them, and siliconed the ends and screw holes. This seals them, leaving no location for air to whistle, or water to leak.
It made a huge improvement in the wind noise issue. BUT, the other thing that will help is the front "hooks" on the sunroof. Cleaned, repainted, and bent a little closer to the glass will make the roof more difficult to remove/replace, but will pull the front of the glass down snug enough to reduce turbulence. No turbulence = no wind noise. Then you just need to shim the back latch area if you still get noise there.