Heh... well something must be wrong in the trainingprocess if the dog starts to bark all the time. Seems that the barking has not been put under stimulus control. Remember that it only learns what you teach it to do. And one thing important is also this:
The dog always decides what is a reward, and what is punishment! humans can not decide those.
I think there is just one reason why dog barks like that. Its wants something and it knows how to get it by barking.
If you give attention to the dog when its barking, you might be rewarding it. Simple word might do, even 'NO!', depending on the dog. Dog does not do anything that is not useful to it. for example my friends dog. It barks a lot. It just starts to bark and wont stop before my friend yells at the dog SHUT UP!! and when the dog is finally quiet, she pets it (she thinks: i'll pet it as a reward now that it finally listened to me. Dog thinks: so this is how i get her attention! by barking!). And just like that she is teaching her to bark, even tho she thinks that she has just trained the dog well.. actually the dog trained her. So think about it - what are you doing to reward the dog from that behaviour? becouse you ARE doing something.
The people-scaring dog is also humans own creation and training should be planned more carefully. If you give the dog reward from barking near the goalperson, thats what it learns. But if the dog always gets a reward only when it's couple of meters away, thats what it will learn. Good tip is to teach the command 'down'. And make the rewarding very quick and accurate. So that the dog will automaticly lie down when you have its food in your hand. Immediately give the food when the dog lies down. And barking should be tought as strongly as 'down'. After that you have a good chance that the dow will lie down to bark.
After couple of repeats its good to put the down-command under stimulus control with the barking.
We use barking to most of our dogs and it has never turned out to broblematic behaviour. I have 2 barking dogs and they dont bark for food anywhere else than in the searchpractice. I simply ignored them if they did that. THey just did not get any bonus from that. THey wanted something: food, attention.. and if they got nothing , they would not bother to do that anymore, its a waste of time. They soon understood that the barking happens only in the forest and the searchingvest, maps, +other things mean practice. There is a lot of benefits in barking. 1: lost person feels more safe when the dog, the signal of saviour for the lost one, is not leaving him/her alone, but instead staying there with him/her signaling. 2: its very natural to dogs and its easy to build. I dont usually feel good about teaching large dogs to bark becouse that can be very scary. But medium and small dogs are good with bark.
I suggest that you dig into positive & negative reinforcement and punishment.
Positive reinforcement: when you add something nice to the dogs area, example: dog sits, you reward it, sitting is more propable. example:The dog barks at the goalperson 2 meters away -> give treat -> barking far away is more propable.
Negative reinforcement: when you take off something unpleasant from the dogs area as a reward. example: the dog pulls on the leach, you pull it back and let the leach go slack -> making the pulling worth it and make the pulling more propable. example: let the dog free from the leach only when theres no tention on the leach -> not pulling before setting free gets more propable
Positive punishment: you give a punishment to the dog. example: the dog does not sit, its stands. you pull the leach -> standing is less propable.
Negative punishment: you take something good away from the dog. example: the dog does not sit, it stands -> take away the treat. The dog sits: you give the treat -> standing is less propable.