answer is it depends.
last ABS sensor I purchased was a Standard brand for my Ram.. bought it at O Reilly's.
after replacement it caused all sorts of intermittent speed faults which I thought were something else, because it would default and lose although I could watch signal on scanner and signal never disappeared. Drove me all around the diagnostic tree over the course of several months.. because sometimes it would work fine for weeks at a time.
Iplayed with this situation for months,,, trying to repair it and finally I finally said to myself,
maybe it is the aftermarket sensor..
I actually paid less for the sensor from Mopar... and another issue was it was back ordered, this was during covid,... but that new Mopar ABS sensor fixed problem immediately
.. so depending on how critical the sensor is and how easy it is to replace as well as cost difference would be how I made a determination but I learned my lesson.