I don't think you understand the issue. That ruling has nothing to do with prosecuting a sitting president. There's been longstanding policy that that doesn't happen.
The fact that an executive order is incompatible with the constitution is something completely different. That's a law being judged on its merits. Immunity is about the executive as a person.