The character doesn't have to be absent from the show, only the actor who plays the character.
They could simply replace the actor with another one playing the same character. It's happens all the time.
Bewitched had two Darren Stevens. The Fresh Prince of Bel-Air had two Aunt Vivians, MCU's Iron Man had two Rhodeys, etc.
Or, they could simply use the same AI technology that was used to produce the Jennifer Buscemi deep-fake video.
I bought a cut-rate set of Bewitched DVDs a few years back; both my children loved them (we don't have conventional TV, so they'd never seen any 1960s sitcoms before).
By the end of it, they were both all "Dick York was the best, Dick Sargent was terrible!" Exactly what I thought as a kid.