How do I apply path alias patch?
Do you mean of &quot;apply a patch&quot; on a drupal module?
You should use composer-patches, the github page cleary explain of setup it and use for a patch modules\core.
In your case it should be somethings like:
{
  &quot;require&quot;: {
    &quot;cweagans/composer-patches&quot;: &quot;~1.0&quot;,
    &quot;drupal/core-recommended&quot;: &quot;^8.8&quot;,
  },
  &quot;config&quot;: {
    &quot;preferred-install&quot;: &quot;source&quot;
  },
  &quot;extra&quot;: {
    &quot;patches&quot;: {
      &quot;drupal/pathauto&quot;: {
        &quot;issue name&quot;: &quot;https://www.drupal.org/files/issues/2020-04-27/3131286-3.patch&quot;
      }
    }
  }
}

However, this issue is already &quot;fixed&quot;, so it is already in the dev version of the module. Applying on the stable one could fail, so you'd just have to switch to the dev version of the module, aka
composer require 'drupal/pathauto:1.x-dev@dev'

Please note that is best to avoid on production dev version unless strictly necessary. In other words, if you switch to dev, you should update to the next release of pathauto asap it's released