It seems to be a common software issue where the sunroof shade losses it's memory as to what position is "closed". This causes the shade to attempt to auto close all the way, become confused, and open back up part ways. This is easily solved
Simply calibrate the sunroof and shade to "relearn" the positions of open/closed/vent. Close the sunroof and shade all the way (if the shade doesn't fully close or re-opens part ways that is ok). Pull the button down as if you are opening the roof manually, but NOT all the way past the detent position that initiates the "auto open" sequence. With the button pulled down, hold in this position for 40 seconds. It seems like a long time but....the roof and shade will move to all positions and relearn fully opened and closed locations. When the calibration sequence is ended, release the button and turn off the car. New parameters will be stored and the shade should fully close and stop now automatically.