branch specific jenkins pipeline trigger
Do you have 2 different jenkins jobs configured for master and release branches? Since github webhook event is sent to Jenkins irrespective of branch, both your jenkins jobs may be getting triggered by this github webhook event. And since both jobs are configured with separate branches, they may be checking out those branches during jenkins job execution which is why you may be seeing respective branches being printed in both jenkins jobs.
Checkout jenkins multibranch pipeline if you haven't already so you don't have to maintain multiple jenkins jobs for branches.
Now coming back to your Jenkinsfile code, you can try following:

Replace env.GIT_BRANCH with env.BRANCH_NAME

Use allOf inside when condition instead of &amp;&amp;  -
stage(&quot;Step 3: Production Deployment&quot;){
    when {
        allOf {
            expression { env.BRANCH_NAME == &quot;origin/master&quot; }
            expression { params.merged == true }
            expression { params.current_status == &quot;closed&quot; }
        }
    }
    steps{
        -----
        sh 'kubectl apply -f **.yaml'
    } 
}



Note that github webhook will trigger the jenkins job for every branch push or PR merge event (irrespective of branch), so your jenkins job would have to handle multi-branch scenarios like explained in this official doc example.