Cameron Diaz and Jamie Foxx alongside director Seth Gordon at the Back in Action premiere.Photo:Sebastian Reuter/Getty; Anita Bugge/imageBROKER/Shutterstock

Cameron Diaz and Jamie Foxx on the red carpet for the special screening of “Back in Action”; Seth Gordon at a special screening of Back in Action

Sebastian Reuter/Getty; Anita Bugge/imageBROKER/Shutterstock

Jamie Foxxwill always be inCameron Diaz’s corner.

Foxx, 57, served as a big supporter for Diaz, 52, when she made her triumphant return to acting with her first movie in more than a decade,Back in Action, according to the film’s director, Seth Gordon.

“Anyone who was on set will tell you he was the biggest cheerleader and hype man for her, and really for everybody involved, but especially for her,” Gordon, 48, tells PEOPLE exclusively of Foxx and Diaz.

The filmmaker adds that Diaz later supported Foxx throughouthisreturn after the actor had amedical emergencyin April 2023, whichinterruptedfilming for a period of time.

“She got to return the favor in that way spiritually,” Gordon says. “It was a very unusual situation to navigate, but it makes a big difference when they have this old friendship, and it’s coming from such a good place.”

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 celebrity news to compelling human interest stories.

Cameron Diaz and Jamie Foxx in ‘Back in Action’.John Wilson/Netflix

Cameron Diaz as Emily and Jamie Foxx as Matt in Back In Action

John Wilson/Netflix

Foxx and Diaz previously starred together in 2014’sAnnie— the actress' last film beforeBack in Action.

The duo first shared the screen in 1999’sAny Given Sunday, which follows a fictional professional football team.

The PEOPLE Puzzler crossword is here! How quickly can you solve it? Play now!

Back in Actionstars Foxx and Diaz as former CIA spies Matt and Emily, “Years after giving up life as CIA spies to start a family, Emily and Matt find themselves dragged back into the world of espionage when their cover is blown,” an officialsynopsisexplains.

Others in the cast of the Netflix film includeGlenn Close, Kyle Chandler, Andrew Scott, McKenna Roberts, Rylan Jackson and Jamie Demetriou.

Glenn Close, Jamie Demetriou, Cameron Diaz and Jamie Foxx in ‘Back in Action’.John Wilson/Netflix

Glenn Close as Ginny, Jamie Demetriou as Nigel, Cameron Diaz as Emily and Jamie Foxx as Matt in Back In Action

Diaz — who is nextexpected to returnalongsideMike MyersandEddie MurphyforShrek 5in 2026—previouslyannouncedher return to acting in June 2022.

A source close to the star told PEOPLE at the time that she felt “a bit rusty and nervous,” but “mostly excited,” about her comeback. They added that her husbandBenji Madden“encouraged her to unretire.”

Back in Actionis currently available to stream on Netflix.

source: people.com