DI is not fully supported on Logic apps.
Here is MS's answer: https://learn.microsoft.com/en-us/answers/questions/2121956/how-to-setup-di-in-custom-code-with-azure-logic-ap