Except for linking to related questions, comments should only be left if you're OK with them being temporary and likely deleted at some future date. If you have material that you feel should have a more permanent home than that, then it almost certainly belongs somewhere other than a comment, such as in an edit to the post or another post entirely.
As a rule of thumb: Post comments only when they can reasonably be expected to help improve the post they are attached to.
The two examples you note fall afoul of this rule of thumb:
1. Comments that just repeat or add to arguments
The mod message was in response to noticing a general pattern of being chatty in comments, not just that one incident. In general, chattiness is discouraged because it degrades the signal-to-noise ratio of the site overall. Taking the message as about a single incident was probably part of the confusion. (Note that it's typical for mods to not respond to replies to mod messages — the original message is crafted to be as useful as possible for a user to help themselves learn, so questions that are answered by the original message are rarely replied to.)
However, that one incident is illustrative of how to not use comments, beyond just avoiding adding noise to the site. When commenting while disagreeing with an answer, you have to constantly ask yourself before posting another comment: is this comment going to help improve the answer? If you have made a suggestion and the author has rejected it, arguing for your suggestion in a second (or third, fourth, etc.) comment is less likely to help than the first, rejected comment.
When an attempt to help is rejected by the author, more comments are very unlikely to help. Sometimes you will notice a miscommunication that will fix the disagreement and such follow-up comments are probably fine, but those are the rare exceptions — the majority of comment arguments on the site get worse, not better, with more comments. Since arguing more for a change is unlikely to help, that is the kind of comment that should be avoided. (The mantra “downvote and move on” can be helpful to remember at such times.)
Instead, when you have material that you think would answer the question, and for whatever reason it is not finding a home in an existing answer, consider writing your own answer around it instead of mounting an effort to make someone else to put it in their answer.
2. Comments that answer or partially answer a question
This is good advice, but must not be misinterpreted:
Add relevant but minor or transient information to a post (e.g. a link to a related question, or an alert to the author that the question has been updated).
Partially answering a question is not adding relevant but minor information to a post, it's answering in a comment. If a comment would not make sense when literally added to the question by editing, it's not additional information that belongs attached to that post. It does not improve the question, it attempts to resolve the question in whole or part.
Answer-like material can sometimes belong in a comment if it's useful, additional material being attached to an answer that might be improved by adding it. Those comments are fine, since the author of the answer might have overlooked it and be grateful for the idea, and edit it into their answer. (But remember to let it drop if they reject the idea, as above.)
Comments that belong on a question include links to related questions, links to possible duplicates that the asker may have missed, comments asking for clarification of details, comments suggesting alterations to the question that might improve it, and similar attempts to improve the post.
Save answers for answer posts. If you don't have enough material for an answer, or if you're not sure you can back up your answer well enough to justify making it into a proper answer post — then don't. There are lots of people here, and it's not any one single person's responsibility to make sure that specific question gets an answer from them personally regardless of quality or lack thereof. Leaving pointers toward a possible answer in a comment just means the site's quality-control mechanisms can't be used to fact-check it, and so such comments are deleted to maintain the relevance of our quality controls.
Comment to improve posts
In general, comment are for the specific kind of help that results in improving posts, not for all kinds of help. The kind of help that involves giving or leading someone toward the answer is a privilege exclusively reserved for answer posts, with all the intense peer-review attention that answer posts involve. And the kind of help that devolves into an argument should be recognised as “not help” at the soonest possible moment, though I know that we humans sometimes have a hard time accepting that someone doesn't want our help.