I'd look at the wires and connector at the sensor.Is it a single wire sensor?
Cycle the connector, inspect and clean contacts as needed.
It could have a bad ground thru the mount threads, unscrew, clean threads, put back on.More then 1 wire to the sensor?
Ditto above. Circuit may or may not rely on a ground at the sensor, try and see.If nothing works:
You may need a sensor. If it's pricy, hold off as you search for answers.
Call the dealer parts guy and see if they have "lots" in stock or if they have to order
Getting casual comments from the parts guy like, 'never had a problem', 'we order
these on a regular basis' or 'there's a new version', etc will be a clue that can help.
Over the yrs I've ID'd weak parts and got spares that allow me to run a car 10-20 yrs
on! and on the cheap without getting gouged!