Access the latest job artifacts by URL respecting who triggered the pipeline

Here describe how to download latest job artifacts:

I expect to get the artifact of last job triggered by master branch with the following URL:
https://gitlab.com/isard/isardvdi/-/jobs/artifacts/main/raw/docker-compose.yml?job=docker-compose

But if another tag, or branch, triggers another pipeline for the same commit, then I’m getting this artifact instead of the triggered by the main branch.

How I can limit to get only ones triggered by the main branch?