To confirm, we are talking about the felt "U" section trim, that finishes the sunroof aperture off on the interior of the car, ie, just above your head when you're sitting in the car?
Does it not hold in place, too loose, or is it too tight?
Have you tried banging it on with a rubber mallet?
Thom