How to prevent automatic running of environment stop job on protected branch merge?

What happens:

I have a CI pipeline on a repo with 3 protected branches: master, staging & develop.
The CI has a deploy script that deploys a group of modules on the related environment.

  • develop → dev/…
  • staging → staging/…
  • production → prod/…

All 3 branches are protected. So as we develop features, we keep merging them with develop branch which works fine.
When a batch is ready for staging, we merge develop branch with staging branch to deploy the changes on staging environment. We don’t(can’t) delete develop branch when merging with staging. (Remember both branches are protected)
But yet, when the MR is merged, it runs all our dev environment stop jobs. (Remember it’s a grouped environment)

I wouldn’t want to remove our on_stop action because we could use a rollback for when there would be a problem with the recently deployed env/module.

Here is a preview of my CI:

  extends: .only-changes
  stage: deploy
    - if: '$CI_COMMIT_REF_NAME == "develop" || $CI_COMMIT_REF_NAME == "staging"'
      when: on_success
    - if: $CI_COMMIT_REF_NAME == "master"
      when: manual
    - when: never
   - ...some deployment script
  allow_failure: true
    on_stop: rollback
    - build

    - deploy
    action: stop

P.S. I’m thinking maybe it has something to do with not setting the deployment_tier for protected branches or not setting our protected environments.

What is the expected behavior:

When I merge develop with staging, as I don’t delete the source branch, I expect GitLab CI to seep dev environment.