We were mocking APIs with normal OAuth and they work fine.
But when we enable Managed identity-based authentication on an API which is being called from a Logic App, or enable App registered based authentication on an API, the unit test framework is not able to mock that API.