Please remove the connection with the measurement device such as the counter or PLC.
If it is 5V in that condition, it is not a fault.
The output voltage is divided by the input resistance of the measurement device.
The following chart is for the output resistance, 1 kΩ of rotary encoder and the input resistance, 680 Ω of the counter.