The registration method (either via IIS manager or New-PhpVersion) sets
idleTimeout : 300
activityTimeout : 300
requestTimeout : 300
This is vastly different than the defaults and means a bad PHP process will run for 5 minutes no matter what.
Setting all the values this way (equal) is also against best practice and can cause errors as per
The activityTimeout and requestTimeout needs to be set to more meaningful values. I'd suggest you let the IIS defaults take effect, but at least you must maintain ( idleTimeout > requestTimeout > activityTimeout )