Investigations have stalled and prosecutions have declined because of staffing shortages, funding cuts, immigration enforcement and growing distrust of the government.