You cannot use ALTER METHOD to change the protection mode for a method and to request its recompilation within the same request. You must submit separate requests to do this: one to alter the execution protection mode and a second to request the recompilation.
If you attempt to request both a change to the execution mode and a recompilation within the same request, the system returns an error.