Condolances on the loss of your father-in-law.
Your dog has sensed your husband’s upsetment and is staying with him. This is particularly true if your husband had praised or thanked the dog for his attendance, which your dog will obviously see as his reward for a job well done.
This phenomenon can also occur with cats. My mother had brain surgery and her cat, an enormous male Maine coon who was definitely NOT a lovey-dovey guy suddenly sat by her side for hours without moving.
She would reach down and pat his head and tell him what a good boy he was for ‘guarding’ her and he would literally sit at attention until someone else came home to ‘relieve him’ of his duty. She was never alone while he was ‘on patrol.’
Once she began to recover, he returned to his former, more distant self, but he was beside her when she was at her most vulnerable.
Once your husband’s upsetment subsides, the dog will probably resume his former behavior.