I don't know what your set up is, but I personally prefer netting or staked chicken wire rather than an actual fence. My chickens won't fly over anything they can't jump on first. They used to escape from my 6.5ft tall wooden fence by flying onto it and then hopping down, but they don't cross my 3ft tall chicken wire border, unless they find a place where they can dig underneath it.
If your neighbors all have free range chickens I would assume that there aren't dogs/predators running around free all the time, and no one will get bent out of shape if one of your hens roams into their property, so it isn't life or death if they get away from you?
As for training chickens to stay in an area, you sort of can. I have a fence between me and one of my neighbors that my chickens can get across. I learned that the hard way when one of my chickens was killed by the neighbor's dog. However, since then, they have never flown over, even when the dog isn't in the lawn. They learned the lesson immediately and haven't forgotten. My chickens also never cross the road behind my house, presumably because of cars. However, I've had no luck keeping them out of my garden or from getting into one of my other neighbor's lawns, so I guess they teach themselves their own boundaries.