One week afterPatrick Dempseymade histhird surprise appearanceon season 17 ofGrey’s Anatomy,Debbie Allenis discussing how the show’s cast and crew kept his return a secret.

During a recent interview withThe Hollywood Reporter, Allen noted thatCOVID-19restrictions on filming did not make keeping the secret any easier for those involved.

“That secret was kept because everybody knew how valuable it was — and how amazing it was to let it explode when it came out,” she told the outlet.

“It was tough, but we’ve kept secrets before,” added Allen, 71, before recalling the time she andGrey’s AnatomycreatorShonda Rhimeshad to keep quiet aboutDenzel Washingtondirecting an episode back in 2012.

Allen stars as fan-favorite Catherine Avery and regularly works a director for the show.

Paul Archuleta/Getty; VALERY HACHE/AFP via Getty

Debbie Allen, Patrick Dempsey

“Shonda and I kept a secret for three months when I got Denzel Washington to direct an episode,” she said. “Nobody on the show even knew until he walked onstage for his first day. There’s a CIA component to making a show likeGrey’s Anatomy.”

Never miss a story — sign up forPEOPLE’s free daily newsletterto stay up-to-date on the best of what PEOPLE has to offer, from juicy celebrity news to compelling human interest stories.

Dempsey, 55, first surprised fans when he reprised his role as the late Derek Shepherd during the season 17premierein November.

Derek, the late husband ofEllen Pompeo’s Meredith Grey, died in a tragic car crash in the series' season 11. However, he reemerged during one of Meredith’s dreams while shebattled a severe case of COVID-19.

Patrick Dempsey inGrey’s Anatomy.ABC

PATRICK DEMPSEY

Since then, Derek has appeared in Meredith’s COVID dreams twice more, including in the most recent episode. According to showrunner Krista Vernoff’spast statementsabout Derek’s storyline, fans will spot him one more time before the season’s close.

“We all have hopes, but we don’t have anything new to report yet,” Vernoff toldVarietyin December of whether viewers can expect future cameos.

source: people.com