A roof mounted solar array easily adds $20,000 - 25,000 to reroofing a house just in labor (assuming two electricians for one week on either side of the reroofing with labor priced at $150/hr)
If I was buying a house with a solar array on the roof I would consider it to be a liability that is going to add to the TCO of the home and ask for a discount to cover the future costs of removal. The labor to remove and replace the solar array when reroofing is never going to be paid for by the solar array, it’s just an added expense to the TCO of a home.
There are plenty of people who are not aware of the added costs of a roof mounted solar array, I just happen to be aware since I sell and run electrical work for a living.