This question is an exact duplicate of:
The following just happened to me here:
I posted a comment on a question:
Related: [Link to other question]
I made up my mind and decided that the related question was not only related but a duplicate.
I deleted my comment, figuring that a comment would be generated when I voted to close as a duplicate.
I voted to close as a duplicate.
No automatic comment was generated.
I manually generated a “possible duplicate” comment.
Going by the comments and answers to this question, the comment is not generated, if the duplicate question is already linked in an existing comment. This is okay by me, but this search should not take into account deleted comments, because then we end up with the duplicate being unintentionally linked nowhere.
Depending on how exactly the comment generation works, excluding deleted comments might also address this problem.