If you upgrade a 1-Star Unit to Level 2 and you already have 2 of them, it will still deduct 3 Gold.
This happens to me on PBE if I am upgrading units. E.g. if I have 2 Vaynes on my bench and want to buy a third to Upgrade it to Level 2, I still pay for 3 Vaynes although I already payed for two units the rounds before. This is really annoying as it destroys your savings..