A physical barrier such as a concrete curb, or plastic or wood edging works. A barrier like these should go deep enough to force the runners over rather than under, and that allows you to keep the grass trimmed back is you use a string trimmer periodically.
A second option is to cut into the soil along your flowerbeds, creating a tiny little cliff (three to five inches) where your beds meet your lawn. Grass has a hard time making the jump across a vertical face like that. You'll still need to hit it with the trimmer now and then, but this is actually pretty effective.