Er...
If the wheel is sitting straight in the frame, in the same plane as the front wheel and equidistant fron both chain and seatstays, then the wheel is where it needs to be, and the chain coming off is another issue.
Have you perhaps shifted a washer around, from outside dropout to inside dropout.
Failing that, head over to parktool.com and go through their sequence of derailer adjustment.