While the horse is probably bored I think the main problem is the "respect" one.
The horse probably rides around and thinks "hey, I'm the boss here, I can do what I like and I want to go back to the barn" and if your daughter ends the lesson there its just reinforcing his behaviour.
Whenever he goes to finish work I would make him work harder. If he gets very stubborn then lunge him from the ground, teach him that the lesson isn't over.
Also don't have the gate for the "end of lesson" cue. I imagine that when your daughter is finished riding she rides him out of that gate? Instead maybe get into a routine for finishing. Like a lap on a really loose rein then halt in the centre, dismount and lead out of the arena. If the arena is far from the barn then get back on him outside or just walk him back. Don't preceed the barn and food with riding out the gate.
Keep changing before he reaches the point of boredom. There is heaps to do. Jumping, cross poles, circle work, transition work, bareback, riding without stirrups, bending, mounted games type (picking balls of cones and such) etc. Most horses get bored in the ring everyday, break it up.
I agree with a lot of this, but I will also add that in my experience, you want to have variety in when and how long
you work in addition to the variety of the work itself. In training (or solving problems) we rely heavily on consistancy and repetition, whether to work on a new skill, get a spooky horse past horse monsters, or a herd bound horse further up the trail. The down side is that you can fall into what I call a 'consistancy rut'. Horses love consistancy, but whether you're in the ring or out on the trail, if you consistantly do the same 10 things, ride the same 10 miles, ride at the same time every day, or ride for the same amount of time, even an experienced horse quickly learns the point where it believes the work and you
are done for the day. To get out of the rut and get your horse to the 'next step', you need to be purposely inconsistant.
By working on this as a real training excercise with a goal and not just a casual boredom diversion, it will reinforce and foster your horse's willingness to work with you until the 'job' is done, whether is takes 30 minutes or 4 hours, 1 mile or 20. In time, you'll be rewarded with a horse that will willingly go an extra 10 miles or 2 hours even if it is bored, hot, or tired.