I've never bothered to remove my tune granted i've never had to submit a warranty claim for catastrophic repair either. I don't hold any tuner responsible for damage but myself and i'll know if i phacked something up in there..., so like some have said, If you want to play be ready to pay. Should be a golden rule among enthusiast.
Regarding the specifics of whether or not the dealer can tell, this is an interesting post from challengerforumz for reference though this was back in 2016
https://www.chargerforumz.com/threads/hptuners-and-the-warranty.178586/
"Dodge currently has no way to tell if the PCM has been modified if it is in the stock OEM configuration. Ford has the capability to determine that the car has been flashed with something other than a Ford tool. The Chrysler Starscan can not. Chrysler and GM are working on getting that capability but it will take a long time before it happens I am told. That is the reason they keep encrypting the PCM each year the way they do. You can get a custom tune for the mustangs about a month after they hit the market because the encryption in not like Chrysler.
If you use the HP software, are you doing the tuning yourself? If you get a tune at a shop that specializes in HP how do you restore the tune back to stock when you do not have a handheld like Diablo or SCT. Big problem IMO if you need warranty work asap but have to wait to get to the shop that did the HP tune to get it restored to stock."
I can't say what to believe, but in the cases where i've had a Mopar something after 2015, i've always used a 2nd PCM mostly cause i don't want to have the downtime of sending the stock one to HPtuners in my case for unlocking.
I'm a firm believer that if FCA wanted, they could find out if you did something in the tune. Again not something they'll be looking for if you took your truck for an oil change, blown shocks, not working wipers or broken manifold struts etc. But if you brought up your truck cinched up in a flat bed truck with a hole in cyl#3 or a grenaded trans/diff then that might look a little suspicious