I have a 2016 XC90 and had issues with my sunroof. My issue was different then yours but they replaced the whole sunroof track and motor with a 2017 version. The dealer said the 2016 model had issues with water getting in and causing electrical problems. On mine when you closed the sunroof it would close then open back up six inches as if it hit something. Thankfully mine was under warranty.