In this question, I will be focusing on this answer as an example.
So someone asked a question regarding layouts with CSS, and someone gave a solution to do with Flexbox. Now, the answer technically was a valid one, and although it didn't exactly accomplish what was asked in the question (but it was close), it was a useful answer and could have possibly contributed to people looking at that question in the future.
However, after I pointed out the minor issues with the answer, the answerer went ahead and completely edited his answer to consist of a different method of accomplishing the required outcome to the point where it was not recognisable anymore to the old answer.
This caused the comments on the answer look completely out of place and off topic, as well as the loss of some valuable information that could be helpful to those with similar questions in future.
I told the answerer that he shouldn't do that, and instead, should add a new answer or include both methods in his answer due to the aforementioned reasons.
I just wanted to know if I was right in doing so, or if the answerer was correct in replacing his answer.
P.S. The answerer just edited his answer to include both as I told him in the comments, but I am going to ask this anyway because it seems like a good question to be on this site, as I couldn't find one discussing this.