Avengers: Endgame was the final chapter in the battle against Thanos and saw many of the original heroes from Phase 1 band together to stop the Mad Titan and restore 50 percent of the population that was eradicated by the Infinity Stones. Among the heroes was James Rhodes, who took on a more active role as an Avenger following the heavy loss in Avengers: Infinity War. While on the team, he also gained a closer relationship with members like Captain Marvel and Nebula and helped track down Hawkeye's whereabouts after he became Ronin. But even though he played a large role and was present during the Battle for Earth, the Rhodey shown wasn't his true self.
Source:https://www.cbr.com/avengers-endgame-skrulls-peace-option/