Something is moving.
Look at the X axis sheaves and belt, make sure that neither sheave is creeping around on the shaft. Mark each shaft and sheave and run your program, you will see if there is something loose.
Was this a problem before you replaced the encoder? If not, check for a loose encoder coupling.