In a 2v1, your first aim is to delay the attack and protect the most dangerous route rather than trying to win both players.
Stay in a position where the ball carrier cannot simply drive inside you towards goal. If the overlap goes outside, keep your body shape so you can travel with it without opening the inside lane. The exact choice changes with distance from goal and whether a teammate is recovering.
Use the touchline as help when you can. If you can force the ball wide and slow the attack, you have bought time for the winger or midfielder to recover.
Also communicate early. If this happens repeatedly because your winger is staying high by instruction, it is a team-structure issue rather than a full-back repeatedly failing a 2v1. The defensive plan has to account for who is covering that side.