old, and I mean old, marine diesel engine inexplicably looses oil pressure at idle when the engine is warm.
check your oil pressure, do not trust your sending unit. Chances are you have no problem at all, the sending unit is simply failing. If the pressure you measure is within range, you just need a new sending unit (oil pressure sensor).
Universal Diesel 5416
If you have one of these very popular marine engines, the sending unit can be purchased at Napa Automotive for nearly 1/3 of the price of the OEM. Here are a few photos of the part you want.