The problem is that even a light frigate is still going to be stronger structurally and still has an advantage in weight of steel and as has been shown historically, that 2000 yards plus is not unrealistic for an engagement with cannons and given the relatively light construction of a Sloop, it wouldn't take much.
Then you have the other part of it, the sloop is firing from 2000 yards with it's 50 cal and the frigate now turns and comes in on a course to close the distance with the sloop, the sloop now has to turn and run, hoping that it can out run the Frigate, which has a greater spread of canvas and most likely equivalent speed, by picking a course that allows a bow chaser to bear, they will be trying to dismast the sloop, or bounce cannon balls thru the stern windows, the 50 cal can be brought to bear, but the plunging motion of the ship and the rate of closure and the angle of approach, would all combine to make it a very difficult shot for the gunner on the 50, resulting in a dispersed cone of fire, same applies to the gunner on the frigate, but you have a more stable gun platform and he is now firing at the most vulnerable spot on any sailing ship and the fall of shot, would be easier to spot, and adjust for in relative terms, than that of the .50, which would be lost in the bow spray of the approaching frigate and any wave action.
I donot believe, that a Sloop armed with .50 cals, has any chance against a frigate, light or heavy, unless it was dead in the water an uncrewed.