Transported convicts weren't imprisoned in the North American colonies. Much like the convicts transported to Australia after the loss of Britain's American colonies they were set to work. American colonists bought their labour when they arrived in America, and the convicts lived with their new owner - effectively as slaves, although people often used the term 'convict servant' - for the duration of their sentence.
Convict servants could fulfil a variety of roles. Many were labourers, but those with a particular trade or skill would often be put to work in a job that made use of those skills. The Rev. Jonathan Boucher, said that George Washington himself:
"... was taught by a convict servant whom his father bought for a schoolmaster"
The Wikipedia article on penal transportation contains more detail.
In fact, at least some transported convicts actually joined the Continental Army and fought against the British. In the paper 'The Common Soldier in the American Revolution' [ Military History of the American Revolution. Proceedings of the Military History Symposium (6th) Held at the Air Force Academy, Colo. on 10-11 October 1974, Defense Technical Information Center, pp 151-161], John R. Sellers of the Library of Congress observed:
"... Smallwood's recruits appear in direct contrast to the popular image of the common soldier as a yeoman farmer or artisan fighting in defense of liberty and property. Rather, they were the dregs of Maryland's white male society: indentured servants, transported convicts, and sons of poor farmers. All lacked capital and all, so it appears, saw the Continental Army as their best opportunity for employment."
More examples of convicts joining the Continental Army are to be found in "Freedom Wears a Cap": The Law, Liberty, and Opportunity for British Convict Servants in Virginia, 1718-1788, by Daniel Brown of Virginia Commonwealth University. However, he also notes that:
Not all convicts intended to go directly into military service, but used the conflict between Great Britain and the colonies to assist in their attempt for freedom. Convict servant John Williams used his rudimentary knowledge of military drill as a means of cover to escape capture. David Hinds and George Dormon were expected by their owner to attempt to pass as soldiers in order to successfully escape the bonds of servitude.
Transported convicts who had served in the Continental Army, and survived the war, were rewarded with their freedom.
Those who didn't join the Continental army or the British regiments, or use the American Revolution as an opportunity to escape, were obliged to complete their sentences (the owners of convict servants had paid for their labour).
Once they had completed their sentence, they could either choose to return to Britain, or attempt to forge a new life in America.
In fact, the American Revolution didn't quite bring an immediate end to the transport of convicts from Great Britain to America, although the numbers being transported decreased dramatically. Daniel Brown, in the paper cited above, observes that:
The number of convict servants imported during the period of 1776-1789 probably
totaled no more than a thousand.