Extension cords are not for permanent use. It will void any insurance claims, and having the dryer 25 feet from the outlet just screens permanent use to an adjustor or inspector.
Even if you find one do not use it. What you have found so far is a guarantee of a fire.
Get an actual sparky to run some conduit on the wall of the garage and move the outlet. It's probably the cheapest option on the table.
But I'm wondering why you want to move the dryer closer to the window and what the dryer vent situation is. There might be a different solution to your problem.