12-gauge 50-foot cord is fine for a 12-amp AC.
Yes. You’re good. 12-gauge wire is rated for 20 amps, so 12 amps is well within spec even at 50 feet. Voltage drop at that distance with 12 amps is negligible—under 2%, which won’t hurt a window unit.
Where people mess up is using a thinner extension cord—like 16-gauge or worse, a light-duty indoor cord. That’s when you get overheating and voltage drop that can damage the compressor.
Your setup is correct. Just make sure the cord is rated for outdoor use if it’s going through a window (UV resistance, moisture protection) and that the plug fits snugly. Don’t daisy-chain or coil it tightly while running.
You figured it out. Plug it in and enjoy the cold air.