Please talk directly to your neighbour about this. Often dogs do not bark when their owners are home, but the minute the owner goes out the dog starts to bark, so that the owner is not aware that their pet is being a nuisance. If you point it out to them in a diplomatic manner, they will in all likelihood try to ameliorate the problem.