If the type of defeat
@JeffBrooks described happens in Pennsylvania, then that could lead to an armistice and independence. But the question supposes something that is very improbable. The Army of Potomac fighting in Pennsylvania, was not the army under Pope that was defeated in Virginia. The battle occurred in Pennsylvania not in Virginia. The US Army had a railroad connections close by.
Moreover, the Army of the Potomac, under Meade, probably could not be defeated in that manner. The army was much denser. The corps commanders were much more mutually supporting and the army's artillery power was a significant factor.
At Chanc. and in the Wilderness, the Army of the Potomac took a severe beating: but it was never disorganized and forced from the field.
By May of 1863 it was too late.
The victory would not dislodged Grant from Vicksburg and Rosecrans was already backing Bragg out of Tennessee.
Thus the victory in Pennsylvania, if it were to happen, holds Longstreet's command in Pennsylvania much longer. And Bragg has to give up considerable territory.
In addition Burnside was also available to reinforce the Army of the Potomac.
In the Civil War, armies of either side that were able to retreat to a railhead, never dissolved. Unless an army was completely cutoff from logistical support it recovered.
One Confederate army dissolved in Tennessee and Alabama, but it was late in 1864 and it took a long series of terrible defeats.
Lee's army dissolved in retreating from Petersburg and Richmond, but the situation was totally different than what existed in Pennsylvania in the summer of 1863.