Isn't the point of immunity that it's immunity from prosecution on actions that are / would potentially be illegal? You don't need immunity if what you are doing is legal anyways.

Immunity is generally scoped. Challenging the determination of scope is not the same as challenging the action.

Immunity also isn't absolute. For example police in the US typically enjoy broad immunity but that doesn't imply not getting dragged into court. They just have sweeping legal defenses available to them that other people don't.

Probably, but I’d like to see it tested.