Yes is the short answer.
Despite what it says on the dodgey parts of the internet I think panels are just as safe as metal tanks which are lined with plastic (the corrugated Lysaght material is called aquaplate) or poly tanks for that matter.
Solar panels consist of an anodised alloy frame, which would be safer than alloy cookware, a mylar plastic backsheet and glass which is safest bar none.
If any of the real technology involved in PV solar, the doped silicon, silver, copper etc was able to leak out into your rainwater, then electricity at hundreds of volts DC would also leak out to earth. And this would trip the safety switch function inside the solar inverter, stopping production and sending you an alert.
The only time I have seen solar equipment segregated from a rainshed was a close coupled Solahart hot water service, where they run food grade glycol coolant in the flat plate panels and around a jacketed tank on the roof. (this is an anti frost measure) These systems have nothing to do with solar photovoltaics.
The only real nasties I'm aware of with solar equipment on the roof are the old thin film PV panels. They contain some heavy metals but again are benign unless you actually smash the glass.
Commonly made by Kaneka, Mitsubishi (& Schott?) These were typically installed 10-15 years ago, many by Solarshop, and they've been banned for a long time for electrical standards reasons.
You can identify them by a uniform mahogany brown colour under the shiny flat glass, not the textured glass and squarish cells on a white back sheet typical of poly or mono silicon PV solar.