That was a good question.Was it a GM hub or aftermarket? I'm having a similar issue. I found out you can't use an GM abs sensor in an aftermarket hub, and same other way around. Sensors won't work.
I just assumed to get GM oem for the sensor so that’s what I did and it installed without any issue and solved the problem.
I had to go way back in my records to find out what hub I installed. I wasn’t aware there was a difference in the sensors — I guess I got lucky. I did actually install Gm genuine oem wheel hubs back in 2017, right about 100k miles ago.
I’ve almost always done Gm oem or true timken units and never had any issues.