The problem is that SentenceTransformer relies on the indices present in the Series. Therefore, to eliminate this issue, you need to reset the indices before calling encode(sentences):
SentenceTransformer
Series
encode(sentences)
sentences = sentences.reset_index(drop=True)