What are the actions one can do against chess.com players who stop moving when they are in an objectively losing position and refuse to resign? One of my opponents at chess.com just stopped moving after falling into objectively losing position, refused to resign, and made me wait for 20 minutes to claim a win by time.

I've recently resumed my online chess activity and I have experienced this childish behavior of some online chess players several times already.

Does chess.com's engine detect such unsportsmanlike behavior? Or is there a way to flag such users, so that they could be punished? What is the proper etiquette for us to proceed in such cases?

Here's the game position when my opponent stopped moving and refused to resign:

[Title "Me vs Malicious Player"]
[FEN "8/7P/2k1p3/p3P3/Pp1K2P1/1P6/8/8 w - - 0 44"]
Assuming you also have plenty of time on your clock, make a break: have a drink, or check your mail, or pay a visit to the bathroom, or grab a book (even if it's an openings book, it doesn't count at cheating in that position ;) ), or go verify if your baby hasn't hurt herself with that knife she was trying to grab when you were too busy calculating your Bxh6! sacrifice to stop her. Meanwhile, check every five minutes that the opponent hasn't played (the worst trick would be if he plays a meaningless move at some point and ends up winning on time). After your well-deserved 20' pause, collect your point, block this undelicate opponent to make sure you never play against him anymore, and look for another partner. You will win the next game as well thanks to your fresh mind after the 20' break.

In case you're a real chess lover who doesn't care about his virtual Elo rating, and really just want to start a new game as soon as possible, the alternative is to resign yourself. I almost never do that because I do care about my little rating points (vanitas vanitatum, omnia vanitas) and because the pueril opponent might believe he has been smart when he gets gifted that pseudo-win, which might even encourage him to continue his misbehavour. But objectively, we shouldn't care at all what the abusing, unfair player is thinking - It's not our job to educate him, and we don't have the means to do it anyway.