Mine had that same noise for a few weeks before my water pump went up at 24K. When it went to dealer for water pump repair I mentioned the humming noise after shutoff and the dealer said yeah we know of the problem and know what it is. So they repaired the water pump and then diagnosed the humming noise after shut off. This is what the service ticket looked like when I got it back.
7306 verify customer concern, CK OASIS, TSB, SSM, KOEO TEST, COnt Codes, Koer Test, Po243, pinpoint test AK, PID monitor
EEC system Diagnosis (quick test)
Solenoid Asy - vacuum control
EEC system diagnosis - quick test.
Extra Time to repeat final test
EEC system diagnostic pin point test
PID recorder/monitor test with road test.
MT MT93882 Turbo Waste Gate Solenoid Assy.
So what I got out of all this was something was wrong with the Turbo Waste Gate Solenoid. I know nothing about turbos. However now I have 39K on the truck and it started making the sound again end of last week. Dropped truck off at dealer Monday night and they are so back logged they didn't even get to it and can't until next week. Said it shouldn't hurt to drive it I hope there right because I'm driving it. I really think Ford needs to hire some diesel mechanics.
So drove home and shut truck off and it hums for about 2 minutes after shutoff. No codes though that I know of and seems to run fine.