In my case it was solved by disabling the authentication token:
SentenceTransformer("sentence-transformers/all-MiniLM-L6-v2", token=False)
See https://github.com/UKPLab/sentence-transformers/issues/3212 Maybe your issue is different though