Christian Pulisic had Milan ahead before Fede Dimarco's equaliser, but defender Matteo Gabbia headed home the winner in the final minute.
“It was the derby, Milan hadn’t won it for a while, and of course it was important for our current form. I think the players showed a lot of courage and we deserved the win. I don’t remember seeing a team who caused this many problems for Inter in a long time,” Fonseca told DAZN.
“I don’t think we did change the structure of the team. We just did something a little different, which was that if we have difficulties, then Fofana can go between the central defenders in protection. What changed were the players.
“Morata had the same role as Reijnders did against Liverpool, so we didn’t really change. Obviously, they are different players, as Morata can go forward with greater ease, but the structure of the team was the same.
“It was important to give support to Abraham, who did great work, but the tactical structure remained as it was.”
He continued: “It will be a week with a little more confidence, but the important thing for me is to continue seeing the players believe in our ideas, the way they have done so far. We know that we must improve, but this was a victory for the players today.”