The same thing happened to my 98 Z3. The only solution I found was to replace the rear window. The trim is attached to the window. My solution - ordered a new one from emiata.com and replaced myself with the help of the instructions that accompanied the window, about 90 bucks with shipping and a couple of hours.