Debugger and routes dont work together in config.php

When I try to set up “routes”, they only work if they are at the top of config.php. The same is true for the debugger. So only one of them works at a time.
For the debugger this also applies without “routes”, it must always stand at the very beginning of the config file in order to work.
What could be the reason?

My site is still at the beginning, so config.php doesn’t have much content yet:

<?php

return [
  'routes' => [
    [
  'pattern' => 'boring.html',
  'action'  => function () {
    return '<html><body>Boring!</body></html>';
  }
]
  ]
];

return [
    'debug' => true
];

return [
    'languages' => true
];

You can only have a single return statement, everything else after that is ignored.

<?php

return [
  'debug' => true,
  'languages' => true,
  'routes' => [
      [
          'pattern' => 'boring.html',
          'action'  => function () {
               return '<html><body>Boring!</body></html>';
           }
       ],

   ]
];

This explains a lot.

Thank you!