The big issue I see with your plan is that you're doing it in several trips. Your trips can't be close together, otherwise it will be really suspicious. (Court officials X,Y,Z all need 20k gold suddenly?)
Second, I think you're discounting gossip and chatter and courtly intrigue. After your first trip, the guard mentions what happened to his captain, his captain mentions it to his lover, the queen's maid. She mentions it to the queen, the queen tells the king. The court official is called to explain.
Secrecy in a royal court is a lot harder than in other places. Everyone is spying on everyone else, and any unusual actions that are witnessed will become common knowledge quite fast. Within a day of your first withdrawal, everyone in the court, including Official X and the king, will know that Official X was tasked by the king to withdraw 20k gold for some unknown purpose, which will cause massive speculation. What is the king up to? Which faction is gaining that much gold and for what purpose?
So basically, you will draw a lot of attention to the transaction with this method, even if you are not personally identified.
True, close trips together would create suspicion. Might have to space them out longer or take almost everything in one go. It will be weeks before the King would even be told, if someone told him, nobody in the capital knows exactly where to find him at the moment, but I guess he could be contacted magically. Even if he was, he wouldn't be able to do anything about it, except to hire some band of adventurers to look into it. The guy just got his Kingship and hasn't solidified any powerful contacts & allies other than our party. Sure he's got a kingdom, an army and commerce but really nobody but us has been called on to do anything dangerous around his city.