The patch parameters are part of the global GL state, and not part of the shader program. That is likely why you need to set them when you switch programs, if the programs have different patch settings.