For others, if you are facing the same issue please test with the same access token generated along with the same headers from the logic app and test them in Postman/fiddler whether you observed the 401 error.
The above test will help you to confirm if the issue is with the access token generation call or while calling the API that uses the access token header for authentication.
You can also navigate to the run history of your logic app to get the access token value on a fresh test.