Solar panels would need to be removed.
The solar panels would have to be temporarily removed, the roof replaced and the solar panels re-installed. People having to do this have an added expense when the roof fails, so sorry to say.
Best to you.
You will have no choice but to remove the solar panels then fit them again after the roof is repaired.
They have to be taken off