Fix issue for Drupal 7 sites managed by composer with composer 2.8 and preserve-paths. See #1
If you're also in PHP 8.2, your need to use a fork of the official drupal-composer/preserve-paths: sandykadam/preserve-paths to solve the issue drupal-composer/preserve-paths#41