How does the Harrier avoid engine damage when operating from dirt fields?
How does the Harrier avoid engine damage from dirt ingestion during rough-field operations?


The short answer is that they don't. They avoid using these FOD-laden strips if possible, but doesn't have any kind of active method for reducing FOD damage from debris ingestion.

This is supported by an RFP that NAVAIR put out asking for proposals to reduce FOD for the AV-8B:


  The AV-8B currently has the highest FOD damage rate in the U.S. DoD inventory which incurs a cost of more than $100M per year in engine removal, rebuild, and reinstallation, as well as decreased readiness and safety.


The method here is to just deal with it when it happens. The engine is removed, repaired, and replaced when a FOD incident occurs. 

The document also says:


  To date, NAVAIR has experienced more than eight Class 'A' mishaps in the AV-8B due to FOD


Where mishaps are defined: