I know people with a big vegetable patch and a rabbit problem. They fenced the whole thing in with chicken wire. It probably goes almost a foot underground and sticks up about 2 feet.
this doesn't just make rabbits pause, but also small children, so that their time in the veg garden among the podding peas can be carefully supervised. I'm not advocating sitting in the enclosure with child crying outside, but it would give you warning that child wants to be among your precious plants with you, so you can concentrate on them.
You could always plant things which child is encouraged to pick around the edge of the fence?
If you can get the first sprouting of weeds out when your plants are seedlings, the vegetables stay ahead of the weeds which are really just superficially annoying then.
Some parents I know go "don't touch me!!!" in a silly high voice when a child puts a finger towards a flower. So that even touching the flower is a hilarious game - no need for picking.
Others I have come across make a big deal out of smelling the flowers with the child, sticking their noses right inside to get a lung full of the scent.
Some avid vegetable gardeners have put many of their gardening ambitions on hold for a year or two, instead making mud pies in the earth on a daily basis for a whole growing season
Hanging baskets for precious flowers?
Raised beds for vegetables?
Lots of lawn space with fun toys - a trampoline, a climbing frame, a swing and slide, a sandpit with lots of toys? You can buy cheap plastic water play tables which can be a great place to stand and do sand games/ water with bubbles/ corn starch and water/ you name it.
Child might like to stand on a step ladder and help you hang clothes.
I'd be thinking about ways of having the child involved with what you are doing, and consider saving the garden maintenance for when another adult is around to amuse the small child.