Loose lockring doesn't result in a misaligned wheel, as it holds the cog in place and not the axle. The chain is always pulling harder on the drive side, so if your wheel isn't secure, it will tend to slip out of alignment. Your axle nuts are probably loose, so check (and grease) them.