Lichess uses an approximation of FIDE rules, which are different than those used by USCF and some of the other chess servers.
In the USCF and some other servers, there are certain material configurations for the side with time remaining (like K+B), that are simply deemed insufficient and if the other side flags it's an automatic draw. This is likely what you're thinking of.
In FIDE rules, what matters is whether there's a sequence of legal moves that results in the side with time remaining checkmating the flagged opponent. It doesn't matter how stupid those moves are; if they exist, then the side with time remaining wins.
This question getting asked that often (I've seen at least 50 such threads in the last two years) maybe implies that this should be mentioned when people sign up? Like: "Note: We use FIDE rules which are NOT the same as USCF rules!"
Also, maybe it would be fairer if the opponent could dispute the decision so that the first player would need to show a winning line. (since it's hard to decide for lichess whether there actually is a winning line)