With a raised bed the excess water can drain underneath the wall unless you bury the edges. You can also provide extra drain holes in a raised bed wall if necessary.
Here is an area I dug in my clay soil. This was taken after a short shower. With a long or hard rain it would be full all the way to the landscape timbers. In the driest part of the summer, it may take a week or two for the water to dry up. If I were to fill this with good soil it would be a bog garden (which I have considered doing).