It is illegal to play so as to recreate a previous board position from the game with the same player to move (AGA Rule 6); This is a positional superko: it covers the classic single-point ko and also longer repeating cycles; In practice a player facing a ko must play elsewhere (a ko threat) befor...
Why people argue about this
People often think that they can simply avoid a ko threat by making an illegal move like resigning, which is incorrect. The actual confusion arises because the rule requires players to play elsewhere before a ko threat occurs, ensuring no repetition of board positions without breaking the superko principle.