So this would just move the site of the coming battle from Antietam to the Baltimore area. And the Union would be much better supported by the proximity to the Northern Central and Philadelphia, Wilmington and Baltimore Railroads. Wouldn't it behoove Lee to fight as far away from major Union LOCs as possible to help even the odds?
Not really.
Remember that as far as Lee was concerned he'd just absolutely ripped the Union army a new one, while there simply was no Union force of any size north of Washington. He was anticipating fighting fundamentally the same army he'd beaten mere weeks previously, and by attacking a target they absolutely had to engage him over he was probably hoping he could make them attack his entrenchments.
There's also the additional point that it was harvest time, so sustaining an army in the field isn't impossible.
"Take Baltimore", "cut off Washington" all sounds great, but he'd also be sticking his own neck out. What about his own logistics and communications? It's tempting to say the Confederates could just take everything they need from the Yankees, but once they get involved in combat, they can no longer forage, and they'll need replenishment of ammunition, evacuation of wounded, etc.
How long do you expect a battle to take? A flying column with adequate transport can supply for about ten days between replenishments, and if foraging is going on until the battle starts then almost no Civil War battles (as opposed to sieges) are long enough that supply would become a problem. Meanwhile by holding the gaps in South Mountain etc. he can keep the Valley as
his secure supply base, so he doesn't actually have all that far to go from his supply route to Washington.
A raid on Baltimore taking a few days to get there, a few days to fight a battle and ruin the rail communications and a few days to return to supply is a reasonable course of operations, and it'd leave DC in a real state.
Of course, the B and O RR might well serve as a possible supply line for
Lee...
Ultimately it's probably the best option Lee has for doing serious hurt to the Union in the situations then prevailing, given his time limit (the Union's new levies are training) and the wish to follow up the Second Manassas body-blow with a finisher.
The thing he didn't anticipate, essentially, was McClellan. We should not understate McClellan's achievement in simply being able to take a confident army into the field within only a couple of weeks of a devastating rout.