Pets and babies

Morgan

So my dog has loved my son since he was born. She would always be super careful around him so she wouldn't hurt him and once he could start playing by kicking she would be super gentle and play with him. She has also been great when my neices and nephew are over (ages 6, 4, and 1) she plays with them, brings them her ball and tug of war toys and everything. Even if they don't want to play she is trying to get them to, or the very least trying to get them to pet her and cuddle with her. But now that my son is crawling and can stand up, she has gotten timid and a little aggressive. She still plays with him sometimes, but most of the time she is growing at him..she even snapped at him yesterday. I try to give her a "safe space" so she can get away from the baby if she doesn't want to be bothered but she would rather lay on the couch next to me or my husband. All my son has to do is walk past her or maybe accidentally brush her paw and she's growling at him. I try to teach my son to leave her alone, but he's 7 months old so he of course is going to try to get her. He is usually very good about not pulling her fur or anything, he usually just smacks at her bc she will nudge him back to get him to "play fight" when she's is a good mood. Or he will put his hand on her and scratch with his fingers to pet her. He isn't doing anything that should be making her suddenly act this way So I am confused how to make her be ok with him.. has anyone had this problem? How can I help her be ok? Is it just a phase or is she acting out bc she isn't the center of attention anymore? Any advice anyone has would be greatly appreciated!

*getting rid of her is not an option