OP leaves the dog outside in a run during the day while at work. So when nature calls, they aren't always there.

OP, I know a couple of dogs that are just obessesed with bug chasing, my rescued male is one.

I think the best two steps to take is 1) find safe fly traps or fly repellents to try to keep flies away from his run. When I had horses I installed a battery operated sprayer that would mist the area at regular intervals. They are safe for dogs and horses and not expensive. Also, electric fans, flies do not like a lot of air current. Just some ideas.... I'll link example below

2) Find a trainer to work on why your dog is obsessed with chasing flies. If you can help eliminate the behavior AND keep the flies away then you should have the problem solved.