My dachshund did the same thing when I moved into an apartment. I tried a crate, confinement to the bathroom and a bark collar…nothing worked. He had terrible separation anxiety every time he was alone, and would be very destructive. Ultimately we got a corgi pup to keep him company…it worked! As long as he has his pal with him, he’s fine, no more barking!! good luck!