The diode thing is a load of BS. I'm an EE, that doesn't make any sense whatsoever.
The info from a ford tech on the Lightning community who's got a LIghtning himself and has been a highly respected member for a decade + provided some info on how they tell a while back and I'm sure it's similar for the Raptors PCM. It's something along the lines of the computer counts the key cycles, and they have either a program or something that tells them if it's a reasonable amount of key cycles for the mileage and hours logged on the vehicle. Resetting the battery doesn't reset this count, just like resetting the battery doesn't reset your odometer or oil change life info. Reflashing the PCM does reset it.
While yes somebody who drives 2 miles a day vs. someone who drives 100 miles a day will have significantly more key cycles, but when the vehicle has 10k, 20k, 30k miles on it, you're in the hundreds to thousands of key cycles. Every time a tune is loaded the key cycle count is reset. So if you bring a vehicle in with 15k miles with a blown motor or a drivetrain related problem that they could blame on a tune, they can see that the vehicle has a couple to maybe a couple dozen key cycles at 15k miles insteadof 100s of key cycles, which means it had a tune in there, whereas if it has hundreds of key cycles, they can't really say it was reflashed. (Unless of course you loaded the tune a loooong time ago and never took it out, so then it would have hundreds of key cycles but with a tune loaded, which in that case they can see there's a tune still in there). I'd say 99% of the time though, guys flash back to a stock tune right before driving it in, so the key cycle count is literally 1 or 2.
And what about if Ford loaded updates? Well that's logged on your service record. Same example, 15k miles, having drivetrain issues, they check the PCM, only 50 key cycles, looks like a red flag, wait a sec, the last oil change you took it in for they did a PCM update, you're off the hook.
So it's not 100%, and they can't tell exactly what you had in there, but they can tell if the PCM was reflashed by the key cycle count, and if it doesn't jive with a rough count the vehicle should have for its mileage, especially if no other PCM reflashes at Ford on record, then you can have a fight on your hands.
So knowing that, both sides of the argument are technically right. No they can't tell it was tuned, but they can tell from a key cycle count that it was reflashed, and if it wasn't done by ford, the only assumption is it was tuned.