2008 Ford F350 - Temp drops

'08 F350 2WD gas.
Transmission fluid temperature gauge keeps dropping to nothing.
Then tranny shifts hard and engine runs at higher rpm.
I know temp is ok because before gauge drops out the temp is in proper range.
So is it something in the wiring, gauge, fuse blocks, or sensor ?

Yes

From your description, I’d say the sensor is bad. A fuse won’t fix itself, nor will a bad wire, although a short to ground might but not so predictably. Since the truck’s ECU has decided the temp is wrong and goes into a 'save the trans" mode, it isn’t the gauge. So sensor is most likely.