Check that on your profile is turned off auto-renewal of ammunition. In the game, all ammunition and equipment are consumables that, when used in battle, must be reacquired after battle. If your unit is set to automatically replenish ammunition with gold (APCR shells) and equipment, then if you use consumables during battle, they will be automatically reacquired after battle.
If you don't want to lose gold after battle, you can turn off the automatic replenishment of ammo and equipment on a unit in the game's hangar or remove consumables for gold from your units.