They recognized it with the treaty.
Until they did our independence was considered quazi-legal at best by other countries.
Some recognized it as legal to dunk on the Brits. Still it was with reservations in case we lost.
Some did not to keep British favor or to prevent their own colonies from getting ideas.
But once the treaty was signed by both parties it became legal.
If the British had never recognized it many other countries would not have either, at least not officially.
So our independence is only legal because other countries recognized it?