How to increase RUNNER AFTER_SCRIPT TIMEOUT above the 10 minutes?

How does the job timeout parameter RUNNER_AFTER_SCRIPT_TIMEOUT work, together with the RUNNER_SCRIPT_TIMEOUT and timeout parameters?

I run pipeline inside docker image, and in my job I added those configuration:

  timeout: 2h
  variables:
    RUNNER_SCRIPT_TIMEOUT: 60m
    RUNNER_AFTER_SCRIPT_TIMEOUT: 120m
  after_script:
    ...

And I would expect, that If my script will run 3min, I can spend 117 minutes in after_script.

But I expect, when my main scrippt fail after 4 minutes, I have only 5 minutes to do something in after_script.

I use gitlab.com with self hosted runners.