I didn't catch the hardtail part at first either. Is this a welded swingarm or new rear frame? I ask because with the swingarm present there still can be flex with worn bushings.
That only leaves steering and wheel bearings, air pressure, frame cracks, and.... do you have spoked wheels?
And it also leaves wheel alignment, verify chain line is good and run a string forward from the rear tire to see if your wheels are in alignment.