dog biting just when people are leaving the house
This is actually a question about my mom's dog. He's a big yellow lab and is generally a very sweet dog. She rescued him in 2019 and it really seemed like she hit the jackpot - he's a lab with lab energy, but has been good with people, kids, *mostly* with other dogs (there have been a few incidents at a dog park or on a hike between him and another dog, but no blood drawn and I don't know the details - this is maybe a handful of times in hundreds of dog park/hiking situations, so not a habitual problem). The only time I've seen him aggressive at all towards a human (besides what I'm going to describe below) is that he growled at my 5 month old baby, but I know a lot of dogs just don't understand babies.
The issue is that in the last year he has started to be aggressive when someone is leaving my parents' house. I believe it's always someone he doesn't know well - like someone there to fix their washing machine or something like that. He's excited when they arrive, greets them, is his usually wiggly self, will follow them around or play with my mom while the person works. Then when the person is leaving the house my mom's dog will suddenly lunge and snarl and snap at them. My mom has managed to restrain him in this situation most of the time, but twice now he's bitten someone - once just on the pants, but once he broke the person's skin and then my mom's dog had to be quarantined at home. Obviously my mom is very stressed about this situation. She loves this dog, but it's an issue. To complicate it, my family (three kids under 5) is supposed to stay with them later this summer and while he's never had an issue with the kids before, the idea of having them around an unpredictable 90 lb dog is stressful to my mom brain.
My mom is working with a trainer, but not having a great deal of success so far. I think the trainer's advice so far has been to give him lots of treats while someone pretends to leave the house over and over. But, he doesn't have this issue when my parents leave the house, so I'm not sure this is effective. Also, my dad is not helpful in dog training, so my mom can't really practice this on her own anyway. My mom has also floated the idea of having the dog kenneled when people are over, but my dad won't tolerate it because the dog barks. This also isn't tenable for an entire week while my family is there to visit.
I will also add that I think her dog generally needs more exercise - she throws the ball for him in the yard and gets a lot of running in, but her health doesn't always permit her to take him to the dog park where he can do sniffing and exploring like he needs. And of course now that he's bitten someone she's nervous about having a dog walker come and take the dog to the dog park.
Anyway, anyone ever have a dog do something like this? A generally super sweet dog who bites strangers just as they leave the house?