(Re)define your win conditions
We all like to make jokes about how arguing on the internet is both an all-consuming endeavor that we can become obsessed with, neglecting everything else going on in our live's becomes someone on the internet is wrong. At the same time, though, it is a pointless endeavor, since the people arguing with each other are not going to change each other's minds.
The first of these is only true if we let it consume us. But it is false that it is a pointless endeavor. If your goal is to change the person's mind who you are arguing with, you are probably not going to see the change happen right there in that argument. However, if your goal is to make sure that the audience is properly informed, that is a a goal you can accomplish. You can provide sound arguments and evidence against your opponent's position, and then just walk away. They may try to challenge your argument in a way that seems like it merits a response, but they will always want to have the last word, and eventually they will just be shouting "nuh uh!" Anything you say after that will only be a distraction from the matter at hand, because you will either be saying "yeah huh!" or you will start talking about how silly it is that your opponent has not given up.
When you do this, you are doing your part to stop the flow of misinformation and bad ideas–assuming, of course, that your information is correct and your arguments are sound. This might be something you have argued about enough times that you know how to support your position typing one paragraph and posting one link for reference. It may be more challenging, though, requiring more extensive research, or more time piecing together how your data leads to your conclusion. You may have the humbling experience of realizing there is something you were wrong about, but you will be able to catch that mistake before someone else does. People on the internet will never forgive you for factual mistakes.
The rewards for putting in all of this effort are two-fold: you now have a better understanding of the subject, and you have more confidence in your position. That means you should also be better at persuading other people on your position. Even if nobody is there to tell you that you have won the argument, and all of the internets, you can at least declare yourself a winner–and feel like one, too.