I'm new to the group - but dealing with the same issue. You most certainly got your answer elsewhere, but yes- the sensor is in the housing and must be replaced as a unit. Lots of stuff says that most aftermarket assemblies are trash and don't fix the problem.
I am a small church pastor in SE Texas (Livingston), having only recently moved here from NW Arkansas. My truck is a 2018 RAM 1500 Laramie that currently has a little over 160,000 miles. Until recently, it has been amazingly reliable.
But early in July, while an hour from home with my wife...