My teapot girl was able to jump any gate I used until I got the one below, it's tall and has nothing the dogs can use to climb. Only problem is, if your dog is under 4 1/2 lbs, or are thinly built, they can squeeze between the rails.
Walmart.com: Regalo - Easy Step Extra-Tall Walk-Thru Metal Gate: Health & Safety
If you use the xpen type pen, you could get a cover for Xpens. There are canvas covers or metal covers that are made of the same xpen material. I have one of each type - never had a girl climb out!
Amazon.com: Precision Pet Pro Handler Exercise... 4' x 4' GoGo Exercise Pen UV Top / Cover Royal Blue | Dog Kennel Covers
Good luck