My concern is that if I edit the answer that comment gets non related and nonsense.
Comments can be deleted and often times become obsolete. There's no need to worry about editing your answers because of this.
The way I approach situations like this is by following these criteria. These aren't canon but simply the way I approach them:
Does the edit to the answer significantly change the original answer? If so, then I'll post another answer.
Is the change to the answer due to changes in the original question? If so, then I'll probably edit the original answer.
Is there a value in bothwith two distinct answers, no matter how much one or the other maymay appear to be "better" solution? If so, then I'll more than likely make two different answers
Is the second "answer" and addendum or clarification of the first answer? If so, then I'll just edit the original