I see from the images that the layers do not shift left or right but have varying thickness. I had a similar problem and this is caused by varying hot-end pressure. You need to find the root cause of the variation, which may include anything in FDM printers. Consistent layers are only produced if the nozzle is consistently exactly one layer above previous layer and if the hot-end and extruder can consistently produce the same pressure so that the filament fills the expected layer area.