I know of a couple of reasons that the belt might wander off, It's unlikely but the belt could have been made incorrectly, Or stretched more on one side than the other. This could cause the belt to wander off the pulley. A quick check is to mark one edge of the belt, Then remove the belt and turn it so the mark is on the opposite side. If the belt tries to wander in the opposite direction, you know it's a bad belt. The second and most likely problem is that the Pulleys are not lined up correctly, or the spindle and the counter shaft is not parallel to each other. This could be something simple like some of the bolts loose on the mounting bracket, to something hard to fix like a worn-out bushing or Worse the cast bearing point. you can check the pulley alignment using the straight edge, preferably one that is the same width as the pulley step. Otherwise just line it up as close as you can. if the pulleys are in line, check to make sure no one has put any shims under the headstock or tailstock area of the bed feet. Next measure the distance from the chip pan to the counter shaft. There should not be any difference between the two ends of the shaft. let us know what you find.
stay safe and have fun.
Joe.