Good stuff; your reasoning about the use of the state tiddler is correct. At the moment, clicking on a tab sets the state tiddler to the title of the tiddler holding the content of the tab. You’ll need to add a condition, clearing the state tiddler if it is already set to the current tab.
The core “tabs” macro is defined in this tiddler:
The tiddler appears blank in view mode; click the edit button to see the content.
Now, the change you want to make actually goes pretty deep; it touches the most fundamental part of the logic of the tabs macro: what happens when you click on a tab. Making the change requires understanding how the tabs macro currently works. I’m afraid I don’t have time right now to code it for you; if nobody else here steps up, you might have to figure it out yourself by studying the existing code.
Best wishes
Jeremy