I have a yorkie and for a minute we played lets outsmart the dog LOL

No matter what we did she figured out how to get out of it. Sometimes I joke she's a little monkey. We'd find her in the oddest places when we'd get home. I went to home depot/ lowes can't remeber which and got a sheet wood about $3 and figured out how to rig it to block the door way. You can get plastic too but it's more expensive. Never had problems after that.

Good Luck