No, don't do that.
Plastic bags don’t seal well, they trap moisture, and condensation is real. Even if the outlet seems dry, humidity and temperature changes will create condensation inside the bag, which leads to corrosion or a short. Indoor cords aren’t built for UV, rain, or temperature swings — the insulation cracks over time.
Extension cord fires are fast and sneaky. The “just this once” outdoor use is how people burn down their garage. Spend the $20 on an outdoor-rated cord. It’s the same hassle to plug in, and you can leave the plastic bag where it belongs: in the recycling bin.
Your house is worth more than the $20 you’d save.