"Losing" protected gold.

I’m not even sure if I am losing gold or not, but I had about 20k left and a treasurey that protects 250k gold, but when I come in after being attacked it tells me “-12,000 gold” although I’m not sure if I actually lost that or not. It feels like it’s broken and shouldn’t be saying that. Maybe it means to say “12,000 gold saved by defences!” or something?

It’s because only the gold on your Treasure Chamber is protected, so players can take money from your taverns.