Nissan sentra temp troubles

I’ve owned my 2002 nissan sentra for 6 years now and over the last year I’ve had a recurring issue where the temperature gauge would rise rapidly while coasting. This spooked me originally and I drove my car to a friend who owns a car repair shop.

While driving I noticed that while I was accelerating or driving up hill the temp would fall rapidly back to within the normal range, then when coasting downhill the temp would spike high again.

I have driven with this problem for over a year at this point and have even done some fairly far driving with this problem occurring.

I’ve looked online and seen that my year car was recalled for a bad crank position sensor and causes the service engine soon and potentially causes problems with engine cooling.

Could this be further issues from a bad sensor or could this be something worse?