I'm glad you're thinking of this! Stepping in poop is one thing, but if the chickens take out a bunch of garden plants, that would be worse, to me. That could be months of time (starting the seeds, planting, weeding, tending) gone to waste and destruction of the crop too. Or if they destroyed some very expensive ornamental plants.I want to keep the chickens out of their garden so they don't eat everything.
If you can put up a barrier of some kind where they cross in to the neighbor's yard, that would be a good thing. Maybe talk to the neighbor too, to let them know that you want to and are trying to find a way to keep the chickens on your property. They might appreciate you approaching them about this issue.