Washing in a dishwasher?
First this is an after the fact solution. Your hat is already stained, a SweatCatcher prevents this. Also, dishwashing detergents are meant for hard surfaces such as glass, ceramic and metal, not cloth. The harsh chemicals in dishwasher detergent will wear your hat out shortening it’s normal life-span.