In practice, I doubt the federal agents would be arrested for directly violating that particular state law. The initial arrest would be for, say, DUI and resisting arrest, with the charges later dismissed.
Since the purpose of this would be to prevent them from seizing firearms, there might be a 48 hour pause in which their intended victim’s weapons would be transferred, making them no longer available for seizure.
It does not work that way. Remember, federal agents have arrest powers and if they are faithfully performing their federal duties and a local cop tries to impede them by trying to arrest them on trumped up charges then the local cop will be arrested by the feds on the spot and brought before a federal magistrate. A criminal complaint of obstruction of justice would likely be initiated against the local cops also as well as a grand jury indictment of impeding, interfering or trying to intimidate a federal official.