Your horse will always know where the way out is and will be drawn to the gateways.  Avoid saddling, feeding or resting in or near gateways so that your horse doesn’t find more comfort than they need there.