This is a very complicate situation, horses that try to exit the arena are not focused on you and on the work you're asking, it can also means it doesn't trust you enough to stay alone with you, it can also mean that you are not strict enough with him and he doesn't respect you as his master.
What you can do is prepare yourself when you come to the exit by opening your arms to form a funnel to lead him correctly and also keep your legs very tight to him so that he will feel like he cannot escape from you. He will feel that you're the master on his back.
If this doesn't work, you can put your horsewhip on the exit side and give him a little tap when he tries to escape, don't forget to reward him when he goes back to the right direction.
I also think like Abby that a person blocking the exit and eventually scaring him a bit will help him to stay on track.
I hope I could help you, good luck :)
have something or someone be blocking all exits so that they can’t leave. I would also put people at the corners of the ring to let him know there is no way he is getting out. It takes time, but eventually he will start to learn that there is no option of leaving and you can slowly reduce the number of people in the ring helping you keep him in.