Joseph paid their debt

Genesis 43:23 “Everything is fine,”t the man in charge of Joseph’s household told them. “Don’t be afraid. Your God and the God of your father has given you treasure in your sacks.s I had your money.”t Then he brought Simeon out to them.

“I had your money,” is also “I got the money for your grain.”
The guard got his money for their grain, which means that when Joseph had his men put money back in their bags when they were there last, he put money from his own account in there. He stayed right with the accounting of Pharaoh and didn’t steal any grain, he just paid for their grain himself!