First I am sorry to hear about your husband, it must be very hard on the family as well.
Dogs don't really get jealous, they can sometimes feel possessive of items and that can transfer to humans.
I think there may be an odor in the baby rooms that she may be drawn to and feels it okay to eliminate in there and I think that there is a stress combo thing going on as well.
At this point you see that scolding does not help and it will not help. All that does is make her more nervous and she may have more accidents as well she may start hiding in different areas so that you don't see her go.
I would want to drop off a urine sample to be sure there is not a medical reason, and if that is clear you can attribute it to stress.
Your best bet at this point is to be sure she empties her bladder before you visit the grand children and then keep her confined to an area or a crate so she does not have access to the rooms. Crating can make a dog feel like it has a den and give them security.
This is not a good time to let the dog have run of the home because knowing that she may potty is just setting her up to fail at this point so we have to keep a close eye on her and if you have not crated her and see her squatting, interrupt the behavior by clapping your hands or calling her name and given a go out for potty command and immediately take her outside. Once she is outside give the command for potty repeatedly and when she is done, praise and reward that behavior with a special treat such as a hot dog sliver. Something that will resignates that 'I only get this special treat when I potty outside" The more good behavior you can catch her in the more you will see it emerge.
Dogs can actually learn to potty on command by doing the above exercises and that should help you in the long run with potty outings when you visit your daughter.
I would also do some positive obedience training with her so she begins to attach herself to you and see you in a leader type position and this is done through training positively even if she knows her commands, you are building a bond.
There are also doggie diapers which can help if you think that route may be easier for you at this time.