When your not there you have to put them up in either crates or rooms with closed doors. They can get over a gate, even if they have to climb it.
Gates are only for when your there.
I hope you don't have to place one, if it gets bad its a possibility as well.
I'm sure you'll get more advice. I know I only hit posts here and there. So many to read so little time.