What is the motor attached to ?
Sorry, I forgot you posted the datasheet in your first post. That datasheet is in German. Does it say that the encoder output is analog 0 to 5Vdc ? Is it possible to turn off the power and move the motor by hand with digital meter reading the output to see what the voltage measurement is at that point. Obviously there is something wrong with the connection or electronics. The reading shown (spike) is not real. It is what is called "dropping bits" in the uprocessor debug terms meaning there is a short or open somewhere causing a bogus reading. You need to bypass the uController and read the encoder analog output manually with a multimeter. Take a photo of the encoder and do a continuity check of the encoder cable pin by pin to check for a bad connection on the cable. There has to be an explanation . The reading has to be false because it is measuring ANGLE and you know the ANGLE cannot be what it shows , where it shows it. Find the cause of the error using a digital multimeter. If two different encoders give you the same reading then it must be in the cable. I cannot explain the fact that it is consistently the same location. That is both a mystery and a clue. Good luck.