Montana's bill doesn't explicitly criminalize continued federal efforts to enforce their laws (the bill New Hampshire is considering does!), but they might still be able to do so based on violating civil rights under color of authority or something like that.
This is the only real solution...defang by making any federal enforcement official criminally liable in any case where a state's constution or the civil rights of its citizens are violated.
I mean arrested on the spot and given a speedy trial....then and only then will they drop the "I'm a federal agent and I can do anything attitude...".