Let's be realistic here. The only bit of useful code from your answer that set them in the right direction was:
Directory.GetFiles(folderPath);
That could have fit easily in a comment.
You couldn't have known that the OP oversimplified their problem statement and only mentioned that they need to read a single directory. Which you answered. Turns out the OP has a directory tree with files and subfolders to be processed.
Of course their own implementation wins the helped most award in that case.
Is it bad luck? Is it malign? Or just uninformed? I would not have done what the OP did, but I see no big problem with it either. They shared their solution and didn't keep it for themselves which is good. Due to their lack of reputation they couldn't upvote. They might have felt that their own answer better reflects the solution that was tersely described in the question.
As the user is relatively new you could have offered a link once to: What should I do when someone answers my question? But that is about it. No matter how acceptable your answer is, only the OP decides on which answer helped them most, which is the meaning of the accept mark. Don't go down the road of pestering OPs to mark one or the other answer as accepted, not in comments and preferable not on Meta either.
In the end an accepted answer only gains you 15 reputation once. Writing a better competing answer gives you 10 reputation for each upvote. You can still look into possibilities to improve your answer, assuming the OP stands by their accept vote.
GetFiles
method you offered but beyond that they shared their own implementation. Their action os not in my spirit but the OP is free to answer their own question and to accept the answer that helped them most. Better luck next time. Shrug it off, move on.