For reference, the text of these feats:
Dirty Fighting
You can take advantage of a distracted foe.
Benefit(s): When you attempt a combat maneuver check against a foe you are flanking, you can forgo the +2 bonus on your attack roll for flanking to instead have the combat maneuver not provoke an attack of opportunity. If you have a feat or ability that allows you to attempt the combat maneuver without provoking an attack of opportunity, you can instead increase the bonus on your attack roll for flanking to +4 for the combat maneuver check.
Special: This feat counts as having Dex 13, Int 13, Combat Expertise, and Improved Unarmed Strike for the purposes of meeting the prerequisites of the various improved combat maneuver feats, as well as feats that require those improved combat maneuver feats as prerequisites.
vs.
Improved Unarmed Strike
You are skilled at fighting while unarmed.
Benefit: You are considered to be armed even when unarmed—you do not
provoke attacks of opportunity when you attack foes while unarmed.
Your unarmed strikes can deal lethal or nonlethal damage, at your
choice.
Normal: Without this feat, you are considered unarmed when attacking
with an unarmed strike, and you can deal only nonlethal damage with
such an attack.
There's an obvious comparison of the listed primary benefit of each feat which is fairly trivial; unless you are specifically intending to fight unarmed, Dirty Fighting is a more generally useful feat. Flanking occurs far more frequently than an armed character being separated from their weapons and forced to fight unarmed, but Improved Unarmed Strike is mandatory for any unarmed combat specialist.
However, as wild-shaping Druid, you are not playing an unarmed combat specialist - your attacks are natural weapons, not unarmed strikes, so you already count as armed and do lethal damage - so Improved Unarmed Strike by itself is no use to you. You are only interested in Improved Grapple. Dirty Fighting's special quality enables you to qualify for Improved Grapple without needing Improved Unarmed Strike. It also allows you to take many other Improved Combat Manoeuvre-type feats without having to meet certain other prerequisites. This seems intended specifically as a way to make those combat feats available to a wider range of characters without needing to pay an onerous feat tax (Combat Expertise particularly is much loathed in this regard) or meet Int/Dex requirements. Dirty Fighting may be the only way for low Int/Dex characters to qualify for many combat feats.
However, Dirty Fighting also only counts as Improved Unarmed Strike for the purposes of Improved Combat Manoeuvre feats and feats that have Improved Combat Manoeuvre feats as pre-reqs. Specifically, there are many feats that have Improved Unarmed Strike as a prerequisite that are not Improved versions of a combat manoeuvre, and thus Dirty Fighting does not help you to qualify for taking those. Most of those feats are only useful when using unarmed strikes so they would not be helpful while you are wildshaped, but a few could be applicable to your natural weapons. If you planned to take those feats, you would still need to take Improved Unarmed Strike.
Ultimately, Dirty Fighting is a generally superior feat for those who do not actually want to fight unarmed. You should retrain Improved Unarmed Strike to Dirty Fighting as it will provide you a much greater benefit.