Fencing is the only sure thing because chickens love gardens.
I keep my chickens in chicken tractors during the day and let them out just before bed so they can make their way to their coop and wouldn't you know it, they stop for 'snacks' all through the garden and flower beds before finally...