is it correct to resign as a beginner if you’re losing badly?

I say the answer is no, because as a beginner you can play to the end and learn about the many different ways your opponent can check you and you can also try to save the game with a draw.

Well your rating is 400, and at that rating I would definitely not resign. There's almost a guaranteed chance your opponent will slip up and as a result of the blunder you will equalize or become winning. Once you get to the low to mid 1000s, that's when it's likely that your opponent won't allow you to get back into the game in a majority of cases and you're probably better off resigning.
Dunno if anyone said dis but, if beginner play on. The might get overconfident
“Vronsky’s interest in art and the Middle Ages did not last long. He had sufficient taste for art to be unable to finish his picture. He ceased painting it because he was dimly conscious that its defects, little noticeable at first, would become striking if he went on.”
― Leo Tolstoy, Anna Karenina
OK, so I'm not going to read through the whole thread, but am going to offer my thoughts. I can bet there will be plenty of 'no, you should never resign as a beginner.' I do not agree with that.
What if you're in a position where your opponent is up a queen and 2 rooks. You only have 1 pawn left. What are you really learning from playing this position? That there might be stalemate if you wish for it hard enough? That is not making you a stronger player. You could've used that time to play a new game or to go over your own game.
The question is where you should draw the line. Being a piece down is not enough to resign in most cases. Being a queen down should be. Just resign, look what you did wrong and try and not do it again. You save yourself a ton of time. Moreover, when your goal really is improving at chess, then you're not even served well with saving the queen down position once every 100 games. You should strive to beat your opponents by skill, not by luck.
Of course, maybe you're playing for fun and you don't like resigning. Sadly, in online chess, the ethics have shifted over the past few decades thanks to a certain American GM's bullet shenanigans. If you'd be playing in real life on a real board, however, and you would continue to play down so much material, don't be surprised that opponents politely decline to play another game with you.
Just played a game today where I was down by two minor pieces (6 points in material).
Managed to walk my pawns up the board, take two enemy rooks and a knight in the process of queening a pawn with a check.
Also managed to make the major mistake of stalemating the queen+king vs king ending .
So there are two lessons to be learnt from that game from my perspective:
1) keep fighting and you could totally win
2) do not stalemate, if you manage to turn the game around
And two lessons from opponents perspective:
1) keep an eye on the enemy pawns before it's too late
2) keep fighting even when you only have the king left, cause your enemy might just blunder a stalemate
I just kind of write this here because I think maybe it will stay in my head better as I have written it down. Could be it helps someone else too.
The rating of the players in this rapid game I am talking about was 1000-1200.

OK, so I'm not going to read through the whole thread, but am going to offer my thoughts. I can bet there will be plenty of 'no, you should never resign as a beginner.' I do not agree with that.
What if you're in a position where your opponent is up a queen and 2 rooks. You only have 1 pawn left. What are you really learning from playing this position? That there might be stalemate if you wish for it hard enough? That is not making you a stronger player. You could've used that time to play a new game or to go over your own game.
The question is where you should draw the line. Being a piece down is not enough to resign in most cases. Being a queen down should be. Just resign, look what you did wrong and try and not do it again. You save yourself a ton of time. Moreover, when your goal really is improving at chess, then you're not even served well with saving the queen down position once every 100 games. You should strive to beat your opponents by skill, not by luck.
Of course, maybe you're playing for fun and you don't like resigning. Sadly, in online chess, the ethics have shifted over the past few decades thanks to a certain American GM's bullet shenanigans. If you'd be playing in real life on a real board, however, and you would continue to play down so much material, don't be surprised that opponents politely decline to play another game with you.
Spend a couple of years teaching beginners and get back to me.
If you are in a tournament (if you or your opponent are still in the running for a prize) or in a multi-player match (and neither side has already clinched the match) then do not resign against another beginner. That isn't so much because you may learn more, but rather to still affect the significant results (if it is a tournament and your opponent is still in the running for a prize even though you are not then it is your duty to make sure that your opponent truly earns the prize instead of simply stepping out of the way).
When playing casual games you can continue playing, while there are still potential tricks and traps, as a way of reinforcing your skill with making things difficult for your opponent. Such moves will rarely be listed as the best moves by a computer because the silicon brain can easily refute them, but they are often the best practical moves against a person. A good coach may be able to better evaluate whether or not something is "the best practical shot" but I don't know if an engine can do so.
Real-life examples:
In one (knock-out-matches) tournament I blundered a piece for a pawn in the opening (both of us were over 2000) and I played on while throwing in every complication I could. At the end my opponent still had the extra piece but the K+B+zero pawns vs lone K ending was drawn (I later won that knock-out match and later the tournament). I've won tournament games from other 2000+ players that we later analyzed that had masters walking up during analysis asking when I resigned. And on the other hand I've lost tournament games where I had a big advantage and chose the wrong plan.
In one big single-section Swiss-style tournament I had a middling score for my rating and was paired in the final round against a player rating 400 points lower that was having a good tournament and in a two-way tie for first in his class (the person he was tied with was sitting next to us also paired 400 points up against another player having a middling result for that rating). The game next to us had the higher rated player getting a significant advantage while I had a microscopic advantage. In the game next to us the higher rated player was merely playing out the tournament and wasn't putting everything he had into the game, resulting in the game dwindling to a draw. In my game I threw in complications that tried to exploit my tiny advantage and was finally able to eke out a win. The other players in that rating group that had been a half-point behind those two leaders and had won their final games had been watching our two games expecting to share the group's prize money with one of the two players after the anticipated loss and draw - they were correct on what their shares were be but they shared with a different player than they had expected to.

If a player has two queens and four moves have been played since the second one appeared, presume the player does not know how to checkmate. Never resign to such a player.
Mate in four.

If a player has two queens and four moves have been played since the second one appeared, presume the player does not know how to checkmate. Never resign to such a player.
Mate in four.
I have been told that resignation depends on the player skill
...
Spend a couple of years teaching beginners and get back to me.
I don't teach, but I've spent almost four decades as a TD (arbiter) and have worked hundreds of tournaments each with hundreds of kids, noticing hundreds of very one-sided games finishing with results different from the win that one player had in the bag. Since I don't spend time focused on analyzing games while I am working the floor that would imply that there were many thousands (or tens of thousands) of similar games with similar final results (my best estimate is there have been more than a million games after totaling up the number at the various kids tournaments I've worked, with more than half of those games having both players rated under 800).

@jetoba
I’ve only been running youth tournaments half as long. But, my experience is quite similar.
That’s a big reason I say that beginners should never resign. I admit that counting fifty moves while your king is chased by a queen can be a chore.
@jetoba
I’ve only been running youth tournaments half as long. But, my experience is quite similar.
That’s a big reason I say that beginners should never resign. I admit that counting fifty moves while your king is chased by a queen can be a chore.
I inadvertently lumped in all of the tournaments open to adults and overlooked dividing by 2 players per game. The number of tournaments was right but a more strict review of the kids vs open sections comes up with only about 420,000 games in kids-only sections (around 234,000 in the 43 US scholastic nationals I've worked) and about 95,000 games in sections that allowed adults, not 1,000,000 games (though sometimes seems like more).

@jetoba
I’ve only been running youth tournaments half as long. But, my experience is quite similar.
That’s a big reason I say that beginners should never resign. I admit that counting fifty moves while your king is chased by a queen can be a chore.
I inadvertently lumped in all of the tournaments open to adults and overlooked dividing by 2 players per game. The number of tournaments was right but a more strict review of the kids vs open sections comes up with only about 420,000 games in kids-only sections and about 95,000 games in sections that allowed adults, not 1,000,000 games (though sometimes seems like more).
Still impressive numbers.
I’ve been responsible for running a few tournaments that exceeded 1000 players (our state elementary championships) but the vast majority of those I’ve been TD for have had 40-100 players (local events). The largest local event has 143. Numbers have been in the 30-70 range since 2008. They were routinely 90+ before that. I do not have a count of the number of events, but there have been 2-12 per year for the past twenty years. The past few years, I’m nearly always running the pairings, but I get some time on the playing floor.
Great advice! Thanks!