Or - corrosion causes resistance. Resistance causes increased heat due to restricted current flow. Reduce corrosions reduces resistance reduces heat.
Reducing current also reduces heat but the current draw is presumably required so it might not be the metric that should be reduced unless found to be excessive for the given circuit.
The OP may have incandescent headlight still. Replacing them with LEDs would lower the demand for current and by extension the heat/melting. BUT - that only addresses the symptom not the cause and would be a poor route to go.
Clean the fuse contacts and see if that stops the melting. If not you may have corrosion somewhere else along the current path. Or you may have a short somewhere that isn't enough to blow the fuse immediately but does cause increased heat.
If you have a DMM after cleaning the fuse's contacts measure the current (without the fuse in place) across across the contacts. I'd posit it should be less than 20A but I don't know my how much — 5A less? If it's 20A or more you have a problem elsewhere. Same problem or worse. Dunno.
Also check the connectors on the headlight itself to see if they're suffering any meltdown. Some members have added an additional ground to the ground wire on the headlights (right or left - don't recall). This may have nothing to do with the fuse problem but if the headlight connectors look dodgy you'll probably be having another problem with the them.