Connect App Not Able to Delete Custom Field Created by The Same App

We have created some custom fields using our Connect App through REST API using “authenticated as addon” option. Now, when we try to delete the fields using the REST API (as per Atlassian JIRA Cloud documentation), we are getting 401 - Not Authorized error. Please find the below API documentation and Java code snippet that we have tried with.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-fields/#api-rest-api-3-field-id-delete

String serviceEndPoint = testrayTenant.getCustomerBaseUrl() + “/rest/api/3/field/” + id;atlassianHostRestClients.authenticatedAsAddon().delete(serviceEndPoint);