If the mob dies from the blow of the sword, you have a chance of getting its head. If the mob dies from flame damage because of fire aspect on your sword, it means the mob dies to fire, not you. So no chance of a head drop.