I've been having a similar issue to this in Solo bot games after opening Demo mode. Are you opening Demo mode beforehand? And can you purchase items outside of shops?
Summary: After going from Demo mode to a solo bot game, money is effectively unlimited.
1. Start demo mode with any hero.
1a (optional) toggle Free spells
2. Quit demo mode.
3. Start a solo game vs bots.
You will be able to purchase/sell items exactly as in Demo mode, without deducting any gold, and wherever you want. Displayed gold will increase normally (including after selling items), and net worth after the match seems like it's "right". If free spells was selected in the Demo mode game, it also extends to at least you and the enemy team's Glyph, but the Invulnerability option does not. I'm not sure if the bots get free spells other than Glyph, but they don't spam them like they could, other than Glyph.
Bot games should always work like normal games, and demo mode shouldn't affect other games.
Known issue. Please use search function before you make new topics about the same issue and bump them up if they already exist. Multiple threads like this will get ignored and forgotten over time.
After demo, things don't cost money (at least in bot games) - Workaround and explanation by aveyo.