This is separation anxiety, my male Boxer that i have now went thru this. One of the keys to correcting this is the crate if he will accept it, another is when you do come home after being away don’t make over him when you come home ignore him for about ten minutes or so I know this sounds cold but if you make over him when you come in it reinforces his anxiety about you being gone. My male gets plenty of exercise and I have his half sister here all the time with him so that was not a factor with him.