Unfortunately, many reviewers on Stack Overflow systematically reject edits that correct mistakes in code, even if the correction is simple and obvious. This is contrary to the official rules which encourage edits that “correct minor mistakes”.
Please do edit posts to correct minor mistakes. If the mistake is major, so that the edit would require substantially changing the post, downvote and post an answer of your own. If the mistake is minor, which is the case here, edit. Editing is a very important aspect of Stack Exchange: it's how we can collectively make answers better by pooling our knowledge.
You should always explain why what you're changing needed changing in your edit summary, which you did, thank you.
I assume that your correction is itself correct (especially given that the original poster made the same edit later). Of course, edits that introduce a mistake should be rejected. I would have skipped this review because I lack the subject knowledge to verify it.
I have no idea why reviewers picked this rejection reason (“attempt to reply”). It's intended for edits that attempt to reply to an answer, not for incorrect or overarching edits — the correct reason for that is “clearly conflicts with author's intent”.