I do ring riding, road riding, trail riding, showing and driving and most often alone and leaving the other horses behind. I drive with the gate to the ring open and they never try and go out of the gate.
At 1st when they are inexperienced I hitched and unhitched in an enclosed arena but I am beyond that point now.
So after a good work out my horse kind of gets an idea when we are done. Maybe after a line up or something in the routine. When ever she acts like it is time to go back to the barn I work her just a bit longer not hard to make her resent working just longer. Now I do line ups in the middle of my work out. I also try and do my exits from different areas and angles. I have also driven out of the arena then back in again. My point is you are the one to make the decisions not the horse.
When riding and they think it is time to go back I ride a little further and do similar things so they are not interpreting what is next.
I was watching a friend ride and her horse would start fussing after a few minutes of riding. She would get intimidated and tell herself that it was a good thing to get in a ten minute ride. I could see that this was going to escalate quickly as he started to get fussier and she needed to handle this asap. I made her ride through it and he was fine. My point is if you let them get away with it pretty soon they are going to get worse in hopes that you get off.
Hope some of these tips make sense and are helpfull.