I have the garden 2 fences and one roof "fence" from the chickens. So they eat bugs, weeds, and chicken feed plus the treats I give them. So far flying over the privacy fence hasn't occurred. They are penned in the run a lot.
I have been experimenting with two groups of 9 pullets letting them freerange my front garden since they were really little. They have learned pretty easily not to eat the plants and only to scratch for bugs etc. There are herbs, cherry and regular tomatoes (both ripe and green) and about 20 different varieties of peppers. They haven't touched any of them even though if I pick them and cut them up for them, they will greedily eat them. They scratch alot around the plants, eat the grass, and dust bath between the rows and under the plants but haven't hurt them yet. I couldn't let my older groups of chickens do this with out them snitching something lol.