First, there are two aspects of the duplicate process that you need to be aware of as your question here suggests that you might not be.
1. The question is actually not closed yet
A comment was added under the question
When someone flags or votes to close your question as a duplicate of another question, a Does this answer your question? .... comment is automatically added to the question. Now, it is possible to add this comment manually, but 99% of the time you see this, it means at least 1 person has voted to close or flagged your question.
A post notice header was added above the question
When your question gets at least 1 vote or flag as a duplicate, the This question may already have an answer here header is added to your question. This is only visible to you at this point in time. It won't be visible to anyone else until your question is actually closed as a duplicate (which requires 3 votes, or a single vote to close by someone with a gold badge in one of the tags).
So once you explained to the user that the question is not a duplicate, there is no telltale sign to most users that anyone even voted or flagged that question.
For your question, I don't see any close votes, so it must have been a flag, or the user voted to close initially and they retracted their vote, although the close details suggest a flag.
So basically you handled it properly. Someone suggested it was a duplicate, you explained why it isn't a duplicate, and they deleted the automatic comment. It is advisable to make the comment stand on its own though. I suspect this is your comment explaining why it isn't a duplicate, however without the context of the original "possible duplicate" comment, it doesn't make sense. You might want to proactively say that the suggested possible duplicate is not a duplicate, and explain why. This will help close voters understand why it isn't a duplicate and hopefully persuade them not to close it.
2. The question is already closed as duplicate
But if your question is actually closed as a duplicate (either by 3 votes, or a single vote by a dupehammer holder), the guidance in Someone flagged my question as already answered, but it's not is the best advice you can get.
If it isn't actually a duplicate, you have to assume that someone misread or misunderstood your question. Don't assume malice or laziness.
Clarify your question
Is there something missing or explained poorly that caused someone to think it was a duplicate when it wasn't?
Provide a MCVE
Is your minimal, complete and verifiable example (mcve) unclear? Consider providing a different (or additional) example to better illustrate your problem.
Explain why the question isn't a duplicate
It is possible the question is similar and a good explanation and help clarify the problem. It is also possible you tried that solution and it didn't work. If so, then explain what you tried and why it didn't work.
Mark correctly to enter the review queue
When trying to clarify or explain, do not do this in the comments, but edit the question. And please don't stuff "EDIT" at the bottom or top of the post. Just rewrite your question to clarify and make the whole post as cohesive and well-written as possible. "EDIT" markers all over the place just clutter up the post and make it harder to understand.
Your edits should try to explain in some level of detail why the post isn't a duplicate. Just stating "this isn't a duplicate" or editing the title to say it isn't a duplicate are generally not good choices. For maximum impact, try to keep your edits focused on the problem, and not extraneous information. The more fluff or meta-commentary you add, the more likely you are going to distract from your intent, which will not help get your post reopened (often it will backfire on you).
And you don't have to wait for your post to be closed to try to explain why. You should actually try to pre-emptively fix your post when you get the first vote (or flag) as it is easier to keep a question open than it is to wait for it to get closed and then try to get it reopened.