Flat extension cords are better under rugs and doors, but don't hide them forever.
Flat cords are the right choice. Their low profile means less tripping hazard and less pressure on the wire, which reduces damage risk. A round cord under a rug creates a noticeable bump and puts constant strain on the insulation, which can lead to fraying or shorts.
That said, a flat cord isn’t a permanent solution. Running any extension cord under a rug for months or years traps heat and stresses the cable. If you absolutely must, use a cord designed for floor use (look for “flat” and “low profile” on the package) and avoid stapling or pinching it under furniture legs.
For a door, even a flat cord can get crushed. Get a rubber door threshold cord cover — it protects the cord and prevents the door from pinching it. A few bucks now beats replacing a melted cord later.
Don’t treat a cheap extension cord like it’s invisible. It’s still a wire.