My horse used to do the exact same thing! He would run to the side on the third, try to run back home after the second, almost run into gates, and have huge alley issues. I always felt like he was just not a barrel horse and that he didn't like doing his job. I went to a trainer and a barrel clinic and his problems have been COMPLETELY fixed! Every horse and situation is different but here are some things that helped me out ALOT!
-In practice go into every barrel with your horses head flexed. Keep them rounded and over turn each barrel. You can do this at a walk, jog, and canter. Cones help a lot with this!
-In practice when you turn the third barrel do not head home. Over turn the barrel and head to the side. When you get there slow to a walk and pat your horse.
-Approach the pattern from all angles. Do not just start from the same spot every time.
-When you run home circle your horse to stop. You want to circle the same way that you turned your last barrel so your horse doesn't have to change leads. This will keep your horse from running to the gate. It is also a lot better on your horse. If you do direct stops it will greatly increase the chances of early onset arthritis and other joint problems. (I couldn't see how you stopped in the video.)
-Lastly, make it fun for your horse. Make them feel as though it isn't their "job". Don't pattern every day. REWARD your horse. A pat on the butt or withers after your run or exercise will let them know that they did what you wanted.
As I said, this may not work in every situation with all horses but these were things that helped me out greatly! I feel a lot safer on my horse and he really pushes through the pattern now! Good luck with your horse!