This is ludicrous. Antietam should never have been fought. Lee had ample time to retreat across the Potomac and avoid the massive losses his army could ill afford to suffer. He had nothing to gain by fighting this battle, from a strategic perspective, and everything to lose with the river at his back. Lee bled his army dry for no good reason.Antietam can not be considered a defeat for Lee. May have been his best battlefield strategical effort. He held the field at the end of the day. Not to mention the at least 2-1 disadvantage he faced.
You may have meant tactical effort, which means how he handled the battle, as opposed to strategic, which means how you bring all assets to bear to win the war. But even tactically that is extremely questionable. But from a strategic perspective Antietam was a disaster for the CSA, being the end of the campaign and the prompting the issuance of the Emancipation Proclamation.
From a tactical perspective, both sides held the field at the end of the day, and Lee ultimately had to quit the field before the Union did, so your stated premise is false. As for the 2-1 disadvantage, this is just silly. The point of fighting a battle is to help win a war, not to put up a good fight despite being outmanned and win some kind of symbolic victory. Its akin to treating war like a sporting event. But the 2-1 disadvantage points out the tactical mistake of fighting with a river at his back and limited means to escape if his lines did not hold. It was just a monumentally stupid decision on his part to fight that battle.