Yah, the motion path for anything but parallel to the axle will sweep the sprockets outboard, and out of plane by the complement (?) of the swingarm pivot angle unless some mechanical fix is employed.
I can see some small float on the sprocket (splines like a half-shaft should work fine, but $$, weight, complexity), but not rotation - because that would require its own trailing arm to dictate the path.
Changing the pivot to parallel cures the whole thing, but the built-in camber pattern (which I assume was the a major purpose?) is gone.
For a really limited range of motion the chain might tolerate it, and if power/weight are low enough the usual #530 chain on #520 sprockets gives a bit of leeway.
A toothed (Gilmer) belt would tolerate rotation fairly well if long enough (longer than shown unless very narrow), but not lateral displacement. A V belt will do both, but not with much power.