Right, but nobody hires code monkeys for their bargain outsourcing sweatshop. They hire "experts" with "years of experience" for "consulting" to produce "custom solutions."
There is a category of consulting agencies that actually specialize in high quality developers, charge accordingly, and incentivize talent to stay by giving them a solid percentage cut of the customer fees.
That's outsourcing for the employer, but consulting for the employee. If I consult for a US company while being in South America, I'm still a consultant. They are the ones outsourcing.
A consultant is an advisor, that should have some specific technical or domain knowledge to advise people with.
In reality, everyone can call themself a consultant and i bet you can charge better money calling yourself consultant, even if you don't possess any specific knowledge and just work as a regular dev.
No, there are non-US companies that sell consulting services to US companies. If you are employed by one of these companies, you work as a consultant for a US company (usually as part of a team with several compatriots), and you are not a freelancer since you are employed by your company. If the contract finishes and you're left without a project, you're still employed and drawing a paycheck, and it's your company that finds you a new project to work on.
There is "cheap outsourcing" though and actually hiring a deeply talented expert for that one thing you need done, and done right preferably. And anything in between.