I can’t defend the ruling based on the actual effects, because it puts someone above the law.
However one could argue that this is the logical extension of qualified immunity for police officers which is precedent the court has already set.
To be clear though, I think qualified immunity of any sort shouldn’t be allowed. It’s a subversion of any kind of fair justice.