If you're trading, you don't lose anything.
If you're harvesting, you will definitely see this amount go down, especially if it is close to your destination planet. Small Harvesters can deplete the entire stock of a planet in the same system as your destination planet within a day.