Is it better to do the edit first, wait for an accept, and then flag the comment?
Yes, as the comment isn't actually obsolete until the edit has been made (rather than just suggested). As you've seen, it's now also removing the evidence for the reviewers allowing them to see that the edit really is applying the OP's content from a comment to the post; without that, it really does appear to be an invalid edit.
Note that while marking the comment as obsolete is nice, it's far less important than editing the appropriate content into the answer. Forgetting (or not bothering) to go back and flag the comment and having it stay there is much less of a problem than having the edit rejected because the comment is deleted first.
What is the best way?
Well, ideally one wouldn't need to suggest the edit; if you have edit privileges then the problem goes away as you can make the edit yourself and then immediately flag the comment.
It's also worth noting that, while it's entirely correct that the second answer is Not An Answer, you may not want to use that flag. While the answer is in fact intended to be an edit to his question, it may not be clear to reviewers/moderators handling the flag that that's the case. If it's not very clear when reading the answer that it's supposed to be an edit (even if you can't see the other answer) then you may want to go with a custom flag, explaining that it's supposed to be an edit of another answer. The odds of the reviewers handling the flag simply not seeing the problem (partly as a result of the fact that NAA is an umbrella for multiple problems with a post, of which this is a much less common sub-type) is high enough that I'd be worried about the flag being incorrectly declined, even by reviewers making a good faith effort to review the post.