Pepe joined Arsenal from French club Lille for £72million in the summer of 2019, but struggled to find his feet in England.
Pepe, who was handed a start in the East Midlands with Bukayo Saka rested, caused Leicester problems all afternoon and Xhaka thinks the 25-year-old is getting close to top form.
“I think every player who comes to the Premier League needs a little bit of time to adapt,” said Xhaka.
“I think he is now this guy and the player what we wish, what the people wish, and he is doing very good game by game, training by training.
“I am so happy for him. He helped us today with a goal.”
Alexandre Lacazette and David Luiz were also on the scoresheet on Sunday as Arsenal fought back from Youri Tielemans’ early goal to claim three points that moved them up to 10th in the Premier League.
The victory was Arsenal’s first away from home against a team starting the day in the top three of the Premier League since January 2015, and Xhaka says they must build on it.
“We have to do it game by game [now], not for three games, not for four, we have to constantly be like this, with this energy, this team spirit and after I am looking forward to us doing something,” Xhaka told Arsenal’s official website.