Interesting (and worrisome), that we don't have a complete answer for this!... I spent a little more time Googling it and there were differing notions. Some suggested that plants do excrete certain substances, such as organic acids, either through their roots, through lost leaves, etc. And others suggest the plants store their, um, excrement internally throughout their lives.
But whether the plants are 'pooping' these things constantly through roots or leaves, or releasing them only when they themselves dissolve, those nutrients will remain in the tank and eventually be in some dissolved form.
Pure nitrogen, being a gas at room temperature can of course off-gas, while the other elements cannot.
As a denizen of Earth, I have to suggest that it does work in a closed system, that these elements do get recycled back to their original forms. I just wonder why it doesn't happen to work quite the same way in our aquariums, and why we are having to add additional phosphates and potassium constantly, (trimming and water changes aside).
With the Natural Planted Tank/low-tech approach you're typically adding those nutrients only in the form of fishfood, and often not doing water changes, but you're adding them nevertheless. So perhaps in such a system as this the nutrients are being recycled in some manner. Those systems often do have a rich soil substrate though, which is a significant store of many nutrients to last for some time in any case.