"It's not part of my character to walk out," the unflappable coach told Italian media after Wednesday's 1-0 defeat in Spain.
"The situation in our Champions League group is positive and we have more need of points in the league."
Milan remained second in Group C with four points, although they have slipped five behind leaders Malaga and are only one ahead of Zenit St Petersburg. However, two of their remaining three games are at home.
After selling top players in the close season to balance the books, their situation in Serie A is desperate, with five defeats in eight games so far.
Allegri chose the Malaga game to try and new 3-4-3 formation and said he was pleased with the way things went.
"We did it well in the first half, not so much in the second but we will continue with the experiment," he said.
"Overall, we conceded very little in the entire game. Prior to scoring they had only managed to maintain possession of the ball," he added.
"A slip in concentration cost us the goal and the match. The team did well, created four or five good chances and did not give anything away in the first half.
"We have to improve in attack, we were not lucid enough in the final 30 metres.
"I think the team is more protected with this system and of course we will improve with practice. That's not to say we won't ever return to four at the back, but right now we need to find some balance."
- Sports & Recreation