Not necessarily. Plant based fibres (which underwear was usually made of) are mostly cellulose. Besides, one could argue that wool clothing will have lost most of its oils from washing, while (healthy) hair still has them. As fat keeps liquids away and limits the effects of acids, that might play a role.How does a cloth-melting drug not affect hair? It's literally keratin in both cases.