I don't know if it's applicable, but maybe the control unit needs to be reset. I don't know if there is a procedure for this.
You may also need to lubricate the seals. For this, use shin-etsu grease (it's a type of grease, not a brand). This is what Honda recommends for it's moonroof seals (BTW, a moonroof has a glass panel and a sunroof has a metal panel - I know, that seems backwards).