Parent resource is not locked with parent job retry

I have parent-child structure in my pipeline where I set a resource_group in the parent to lock that resource during each child job execution (and in the child jobs I use an other resource_group to lock an additional resoure).
This scenario works if the pipeline is automatically triggered, but does not work if I there is a failure in a downstream job and I retry the parent job. In this case only the child job’s resource is locked the parent job’s does not

Used GitLab Community Edition 15.8.1

trigger-ci.yml
parent-job:
trigger:
include: child-ci.yml
strategy: depend
forward:
pipeline_variables: true
resource_group: $RESOURCE1

child-ci.yml
child-job:
resource_group: $RESOURCE2