Adam West and Burt Ward returned as Batman and Robin in those ridiculous Legends of the Superheroes tv specials in 1979. Both voiced the characters for the two animated movies before West’s death. I think this might be the longest time past for an actor to return as a costume superhero.
West and Ward's first return to the roles was in the 1977 Filmation animated series The New Adventures of Batman. West would later replace Olan Soule as Batman in the later seasons of Super Friends in the early '80s, though Casey Kasem remained as Robin there. (It was the second time West had replaced Soule, since Soule and Kasem had originally played the roles in Filmation's late-'60s Batman cartoon before migrating to Hanna-Barbera's Super Friends and New Scooby-Doo Movies in the '70s.)
Usually these characters are rebooted or reconceived with completely different actors. An actor has their run as the character and are replaced. If tragedy had not struck the lives of George Reeves and Christopher Reeve its possible they could have returned as Superman. But they may never have wanted to or fans and the studio could have seen them as too old.
The Arrowverse has the advantage of having been able to lay the groundwork for parallel universes. It would've been a lot to spring on audiences for a single episode back in the '90s or so. And The Flash (current series) seeded this revelation once they established that Shipp's Henry Allen had a doppelganger named Jay Garrick, which meant he could potentially have another doppelganger named Barry Allen.