Make gitlab upstream stage appear AFTER downstream trigger job

version: gitlab saas 15.9

Say I have 3 stages in a parent pipeline in gitlab-ci.


The test stage has a job which trigger dynamic child pipeline. So the stage ordering starts like this

build → test → deploy

But when the trigger job has created the child pipeline, the parent pipeline looks like this

build > test > deploy > downstream

Using dependencies?, how would I get the parent pipeline to always display deploy stage as the final stage in the parent pipeline. So…

build > test > downstream > deploy