"Cordage" (the industry term for extension cords) is always downgraded. So a 12 gauge extension cord is rated at 15 amp while "hard wire" (be it stranded or solid) is rated at 20 amps.
Technically, 12 gauge stranded wire would have a slightly larger voltage drop (be able to carry a small amount less current) than 12 gauge solid, but for your distance it would not matter.
The big difference is longevity. The cord will be exposed to sun, rain, snow and likely to get flexed a lot. The other wire would either be direct buried or in conduit, which ever is appropriate for the insulation. Same is true for overhead installations.