Whether or not we should have invaded Iraq in the first place, we succeeded in removing a hateful dictator and smashing a major army halfway around the world with hardly any casualties on our side. That is a sign of enormous strength. A civil war then broke out. That conflict is morally our responsibility, because we might have been able to prevent it. In any case, we are accountable for what happens to a population whose nation we chose to invade. Nevertheless, there is very little we can do to end the civil war. We lack the necessary skills and knowledge. More important, civil conflict is just not something that can be resolved by an outside force; it must be negotiated by the parties. Possibly, if we imposed an effective martial law for many years, the factions in the Iraqi domestic conflict would run out of energy and resources. But the odds favor disastrous results even from such an enormous investment of our resources. Therefore, it is past time to leave. This is a moral failure but not a military defeat, and it is certainly not a "surrender."
(An interesting way of putting things, though it reminds me of a certain Monty Python sketch...)