And it only shifts civil liability. The officer is still (according to the law if not actual practice) criminally culpable for illegal acts they perform.