Don't bury an extension cord for landscape lighting.
No. Even a “heavy duty” outdoor extension cord isn’t rated for direct burial, and temporary doesn’t mean safe. Moisture, ground pressure, and critters will turn that cord into a fire hazard or a tripped breaker within a season.
If you need underground power for landscape lights, use UF (Underground Feeder) cable rated for direct burial. It’s the same stuff electricians bury for real outdoor circuits. Buy enough length, terminate it in a weatherproof box, and plug your lights into that. You’ll spend maybe $30-40 extra but your yard won’t become a buried fuse.
If you really need temporary (like for one weekend), skip burying entirely. Run the extension cord on top of the ground where you can see it, and tape down the connections so rain doesn’t get in. When Monday comes, coil it up. That’s temporary. Anything you dig a trench for is permanent in practice.
Do not cut corners on wet electricity.