Thankyou for using Microsoft Q&A platform and thanks for posting your query here.
As I understand your issue, you are experiencing error "The document cannot be deleted since it is reference by datasetname" while trying to delete the linked service from ADF workspace,however, you have already deleted all the reference resources. Please let me know if that's not the issue.
It seems that you might have deleted all the related resources like dataset associated with this linked service from the collaboration branch , not from the adf_publish branch. Could you please switch to the GIT mode to live mode to verify if the dataset is really deleted from the published branch or not.
Once you ensure that the related resources are deleted from the publish branch as well. Create a new collaboration branch and delete the linked service from this branch and then, merge this change to the main branch and publish it.
Hope it helps. Kindly let us know how it goes. Thanks