I think its a bit late now to try to retrain, we had this problem when our dog was about a year he would bark constantly until we got back home, didnt matter if it was 5mins or 5 hours it was non stop, we sent him for retraining andapparently he barked non stop for 2 weeks ! guess what the trainers name was ----- Mr BARKER !!!! and he didnt think it funny when I laughed.
We have a dog flap but recently have had to close it at night because my dogs go out when the fox appears at night and they bark, only doing their job but dont want problems with the neighbours.