Nonsense data from rotary encoder

I have just purchased a Taiss rotary encoder (E38S6-600-24G) to use on a Pi 4b project running the latest Bookworm OS. It's a 4 wire system with red and black for the power and white for the A phase and green for the B phase. I've attempted to connect it up by using what I could google on hooking up a rotary encode. Here's some sites that I have used: https://thepihut.com/blogs/raspberry-pi-tutorials/how-to-use-a-rotary-encoder-with-the-raspberry-pi, https://ozeki.hu/p_3054-how-to-setup-a-rotary-encoder-on-raspberry-pi.html and https://www.youtube.com/watch?app=desktop&v=4YPgEMdK6AE&ab_channel=MYSONACADEMY%26TECHNOLOGY.

The only difference is that I used the internal pull up/down resistors in the Pi and the encoder was powered from a separate 12V power source. I have the A phase connected to pin 17, and the B phase connected to pin 27.

Running the code from the sites above, turning the rotor has no effect on the output, regardless of the speed and direction it's turned, the values are just more or less random.

Either I'm doing something wrong (most likely), this encoder is incompatible with the Pi (not as likely) or the 600 P/R is something that the Pi gets confused on (maybe likely).

Google hasn't been my friend on this.

I'm hoping someone out there has done something similar and got it to work.

All help (sarcasm excepted) is GREATLY NEEDED and APPRECIATED.