Yes, but it can't not happen, either. If you did lose them in the current system then you would have a mining starbase that continued to mine the resource but didn't produce anything...
It's a weird system where resources are treated sometimes like "amount of stuff" and sometimes like "flow of stuff". The result is a hybrid that works as a game limit rule but that makes little sense when interpreted from the point-of-view of the game universe.
You really should separate the "amount of resources" from the "flow of resources". Mines produce some amount per time adding to your stockpile. Building stuff consumes certain amount which you won't get back and/or running stuff consumes some amount per time which you won't get back, either. It would accomplish the same thing but would make much more sense as a description of what's happening in the game.