You can try distracting the dog, when your grandmother is close to leaving take the dog to a different part of the house, play with him, brush him or just go for a short walk just before she leaves then when you get back he won't be as anxious.
Dogs do pick up on signals easily such as when mom gets ready to leave she will put her shoes on rather than boots, all the dogs will watch her intently, then she packs her backpack, now she is being followed by the mob. Once she touches the keys we usually have at least 5 sitting at the front door waiting.
Since the dogs have honed in on her signals she now gets ready to leave and doesn't.... The dogs will sit there for up to an hour then give it up kind of confused as to what happened. Then there is leaving by the back door.... Totally unnoticed by everyone, it's just play time outside that way and unless called the dogs don't go out so they don't care. There are also tricks of leaving with boots on, or putting on your hat and sitting around the house of an hour... Keeps the dogs guessing and they don't get used to a certain pattern.
You might ask your grandmother if she is willing to work with you to train the dog not to be so anxious about her leaving. We also found out that telling the dogs on e they have been trained a little first what your planning on doing. Such as when I go out I just state I'll be in the barn, I'll be outside or I'm leaving, and wt I will be either right back or back later. They don't understand the words exactly but it's a combination of signals, tone of voice and pattern of words.
With our old cockapoo we trained him to accept someone leaving, he used to have a fit, start scam-yowling and don't stop until we came back. It was over the edge of irritating but mom didn't want to use sedation because of known side effects. We spent the better part of the week with me going out the front door telling him 'I'll be right back, walk out the front door - leaving the door open and standing outside 2 minutes and coming right back in. 'Im back' as soon as I was in and the door closed. He was so confused by why I didn't shut the door he just storied at me.
I then turned the I'm leaving - door open, walked around the house coming the back door.... 'Im back'. At which Rusty came running up to me doing the happy happy dance. About the third day we started closing the door, he give a couple quiet whines and waited patiently for me to return... 5 minutes later 'I'm back' and Rusty did his dance. Mom and I took turns doing this - yes it was a pain in the butt - however it was better then giving him drugs all the time, it wasn't stressful to everyone in the house and rusty was able to get over his problem within 2 weeks of training. I took Rusty with me outside a couple times when I announced I was leaving, we sat on the front steps, or went to the barn and sat for a few minutes, didn't play or have fun just sat quietly with me petting him praising him for being good. Then when we returned announced 'I'm back'. Rusty figured out we are not going to abandon him (he was a rescue from an unknown past but we knew he had been abused). Rusty figured out we never did anything fun or exciting other then walk, which we did a lot anyway so he wasn't missing it. We didn't g visiting or play with the other animals so he ruled it out as boring and just didn't ca after that.
Now we are in the habit weather there is a person inside or not, always announce we are leaving, where we are going and when were coming back. We keep it simple such as not saying 'I'll be back when my chores see done and after I eat lunch'... If it's less than 10 minutes it's right back, then there's 'a little while' or 'later.'
You only have one dog right now which it's easier to town then several the same time. When he feels secure and knows that nothing is going to happen he should settle down. Was why doing some training or keeping him occupied will help with the anxiety quite a bit. If he ever has to be left home alone he will be used to the words better of 'il be back later' knowing that someone always comes back after the words. He may trash the house from being anxious, but it would be worse if he was feeling everyone left him and they were never coming back.
The dog will also settle down to the routine once he has been so the family for a little while longer, he was just uprooted from the previous place, you didn't state if he is a puppy or adult dog, but either day he has left at least one family more likely 2 if he is adult and isn't sure if he is going away and being placed in yet another family. We can't tell them words like 'your mine forever so don't worry we won't abandon you,' They hear,' blah blah blah.... Blah blah. You (name) blah blah'. And think something like... I'm so special my humans talking to me.....
You might want to consider working on crate training if he gets super anxious or destructive while your gone, or if he decides to potty all over the house. It's kind of like the leaving the house training, introduce it slowly, have him take names in there and make a fuss what a good buy he is. Give him a good chewy treat to keep him busy in there, once he is done you can let him out, praise him for being good etc. leave the crate available for him to go in and out as he pleases, you can put a small padded bed inside or a pillow or blanket. Make sure the kennel is big enough for him to fit properly. Once the dog is trained up well you may not have to use it, some of our dogs prefer sleeping in their kennels rather than the bed or couch, it gives them their own personal space to retreat to.
Hope this helps you some, feel free to post with questions or you can send an e-mail