Depends if you’re playing with Japanese of Chinese rules.
Under Japanese rules, White gains one net point every time Black insists on sacrificing two stones against White’s one stone. If Black keeps this long enough, White ends up so much ahead that they can just do anything to break the cycle (such as sacrificing all the White stones).
Under Chinese rules, Black is not allowed to repeat a previous position, so I believe the game could go like this:
Black White
A2 Pass
A3 A1
Black is not allowed to play A2 as it would repeat the position. Black plays elsewhere. White captures at F1 or connects at A2.
I believe this situation is discussed in more detail somewhere in these two topics:
If this happens to you during an IRL tournament, I recommend fetching a referee to make sure the rules are played correctly and to prove your good faith.