Extension cords 101:
https://www.electrical101.com/extension-cords.htmlthe issue is with high wattage/amp drop
"Extension Cords with High Wattage Appliances
Certain high wattage appliances should not use an extension cord when possible (check the owner’s manual). Using an extension cord on these appliances could cause excessive heat and voltage drop, this could damage the appliance or motor.
Some high wattage appliances have a short cord to minimize voltage drop, and should be placed near a receptacle. Vacuum cleaners have a long cord and should not need an extension cord.
If an extension cord is absolutely needed, use one with the proper rating (derated by 125% when necessary) and as short as needed. You can find an extension cord specific for window air conditioners.
Below is a list of high wattage appliances that should not use an extension cord when possible.
Hair dryer
Electric space heater
Window air conditioner
Garbage compactor
Countertop microwave
Electric tea kettle
Toaster / toaster oven
Coffee maker"