As I understand it, the war was increasingly unpopular back in the English Parliament, with factions vying for pulling out of the conflict long before the final battle (and subsequent surrender) at Yorktown.
So let's say Cornwallis either escapes from Yorktown or successfully repels the attack and holds the city, how likely is it that the war would have been lost anyway?
You may be interested in this previous answer of mine that covers the political details in Great Britain after the Battle of Yorktown. The simple answer is that, Yorktown marked the end because it was the event that led to the collapse of support for Lord North's (the Prime Minister)'s majority in Parliament. It took several months of debate, but by the following March, Lord North was facing a vote of no confidence that was going to pass, so he resigned. Subsequently, the anti-war faction of MPs formed a majority and began to negotiate the Treaty of Paris which recognized American independence.
The second part of your question delves into speculative territory, which isn't really history, but what we can say is that, before Yorktown, Lord North still had a majority in Parliament supporting his efforts to continue to prosecute the war, despite the growing opposition. After Yorktown, he didn't. Had the British not lost that battle and campaign, it's very possible there would have been a different outcome or a different timeline.