To keep a V belt in place you need the pulleys to be exactly in line with each other - so if you lay a ruler across one it will lay exactly across the other as well, touching the full width of both. The belt needs to be undamaged (no kinks, notches, missing bits etc.) and tight. If you can meet that standard and it still comes off, I'd like to see a picture of the drive.

If you can't meet that standard and want to try to keep it on anyway, you might succeed with special pulleys that are higher than normal on the sides, and belled on the outermost part. Alternatively a jockey pulley on the slack side helps (they usually jump due to a bight on the slack side).