It is not uncommon for cast members to depart an aging TV show (see also: Emily Bett Rickards leaving "Arrow"). Most actors are contracted only for six or seven seasons of a show, so it's possible Valdes and Cavanagh have simply fulfilled their contracts and are hoping to begin new creative endeavors rather than sign new deals to return (Gustin has already made a new deal, and according to Deadline, stars Jesse L. Martin, Candice Patton, and Danielle Panabaker are in negotiations to return).

Additionally, the cost of producing a TV show goes up the longer a show is on. One of the reasons for this is the renegotiated contracts, and studios not negotiating new deals for actors to return in order to keep costs low also explains why some people don't return to shows when their original contracts end. That doesn't seem to be the case here though.

Cavanagh was apparently set to depart the show at the end of Season 6, but the pandemic disrupted his plan when the show was forced to shut down production. Therefore, he stuck around for a few episodes of Season 7 to wrap up the arc that began in Season 6. Although there are indications we haven't seen the last of him just yet, Cavanagh seems to have said goodbye to the show and his many characters in an Instagram post from February of last year.

"It has been a joy creating and playing the myriad Wells that make up 'Wells st' on #theFlash," he wrote. "At times brusque, sunny, capricious, and perpetually shameless, they will always be linked by a single unbreakable thread of gratitude. My thanks to everyone on all sides of the screen that makes up this wee superhero show of ours."