Actually in 1865 it was the French position that became untenable. The U.S. rearmed the Juarez forces, and it was unthinkable for the French to fight the United States. that's why the French cut their loses, and decided to withdraw. Compared to the ACW driving the French Army out of Mexico would be a simple matter. Less then 10% of the Union Army would be needed for the job, and most of the Mexican People, and irregular forces would be on their side. The French Expeditionary Corps couldn't protect their LOC, while fighting a national insurgency, and an army that was stronger then their own. To make things worse the USN could blockade the Port of Veracruz, cutting their LOC with France, which could lead to a Yorktown situation.