that does seem to be the effect, and I think the design.
The easiest time to take a gate was when it was open, either to let troops out, or more commonly to let retreating troops in. It wasn't unheard of the refuse entry to retreating friendly troops if the pursuing enemy pressed too close.
So I think it is the intention, and the best solution is not to occupy the gate with defenders.
wise and full of devices