Raised beds are just a little different and it's according to how high they are raised. If low, they will treat them like much of the forage area. If high, they might hop up into them to glean bugs or nip some fruit but they won't stay there and steadily forage unless it's a very large, wide bed.
You might have your coop at the edge of the garden, fence them alongside the garden area and then use your garden area for pasture rotation at the end of the season. Some people fence the garden and place fencing around the garden fence about 4-6 ft. out and make a "moat" style paddock wherein the bugs all around the garden have to run the gauntlet of the birds before getting to the garden.
Bee, my garden this year will be in the ground (first time for me), along with 4 of my 4'WX8'LX12"H raised beds. The raised beds will be on either side of the garden and are going to be used only for herbs, onions, and the other 2 in flowers to attract the pollinators. The garden is going to be 30'X50' with very wide row spacing for easy maneuverability. The ground will also be covered with nursery fabric, which will not be chicken scratch friendly, but I can't control weeds in an area that large without it.
I like your moat idea. I could move the sturdy fence out farther and put a smaller less expensive fence right around the big garden.