These specific cases
What happened in these specific cases (and what happened to the flags) is pretty simple. The comments got deleted.
Unsubstantiable accusations of vote abuse are a violation of assuming best intentions until proven otherwise. As such these comments are just noise and therefore deleted.
In the first case (the ruby question), pulling the whole exchange into chat was not a good idea. If someone accuses you of doing things that you haven't done, you're usually not going to convince them otherwise.
This is unfortunately even more true for people who have not quite understood how the SE system works, because what experienced users see as "given", they can sometimes not understand at all.
The correct course of action there is to flag and disengage.
Disengaging can even mean not replying at all (just to put that on the table). Nobody here is entitled to your time or energy :)
For the second question there is no need to give any benefit of the doubt to that interaction. You wrote an answer, OP posted a comment that is in no way substantiated or even referring to the answer. Flag and move on.
The general case
These two cases for now look to be isolated incidents. As such flagging, moving on and then forgetting about it is the prudent course of action.
For other cases that may not be true. Let's assume there is a long-running smear campaign against you. (I'd hope mods would be able to put an end to that before it comes so far...).
What you want to do is not engage with bad-faith actors.
In this case, again: Flagging is your tool of choice as a normal community member.
If diamond moderators don't act on these flags for a long running campaign (and don't give you a justification), the usual options for moderation issues and grievances with the moderator team are also open to you.
That means you can take things to meta (though for "he-said-she-said" cases that usually only fans the flames) or contact the community team over at Stack Exchange.
For this purpose you can use the "contact us" form as described in multiple help-center articles.