Two branches, one position. The switch you wrote resets nothing.
The common read: React renders the branch I wrote, so switching to the other branch of the conditional hands that component a fresh start.
React never reads your conditional, whether it is switching a counter or the box you just predicted. It reads the tree you handed back: two return statements that both put <Counter /> first inside a div are one address, whatever the two blocks look like in your editor. Same parent, same slot, same component, so the node survives and only its props change.
Move the branch further up or further down the function and the bug
Takeaway: Same address, state survives: exactly what a tab wants, exactly what two different records don't.
Run the second case and the bug is the value you were sure would be gone: a draft written for pull request 41, still sitting in the box under pull request 42, filed as "the comment box is not clearing" against a component that never had a reset in it.
