Should have many of the same drawbacks, with 2 big differences:
1. Trains not driving directly on the panels' surface (which makes solar roadways a bad idea in any case). And
2. Trains on their own track, so the 'road surface' conditions of the panels (rain, snow etc) don't matter safety-wise.
That said: imho there's still so many spaces better suited to put solar panels, that between train tracks is among the last places I'd go for. Especially if it requires custom-design panels.
If there's a single downside I'm not sure what it is.