Mine did the same…was driving me crazy UNTIL I found the the headliner need to be re-snapped into place. When the sunshade is fully open I simply pressed the headliner and top (right near the glass roof) together….actually squeezed them together and there was a clear snap sound. I went around the entire opening and found 4 or 5 more snaps. Haven’t had a sound or rattle since….. Not sure this is your issue, but it worked for me.