You can still use a set, but in a different way.
Make a new empty set and use that to keep track of words that have been written to the file. For each word in the original list, if it's not already in the set, then write it to the file and add it to the set.
written_words = set()
with open('file_without_duplicates','w') as file:
for i in words:
if i not in written_words:
file.write(i)
written_words.add(i)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…