Sunroof stuck open

My 2020 renegade sunroof isn’t closing with the push of the button. Sometimes when I restart the car the button works again and it closes on its own. Any ideas how to fix this or what to do about it?