Help with Security Deposit

Help with Security Deposit

I am puzzled at this transaction, so I hope that someone can shed some light on this.

I have a client who I have agreed with on a 5% security deposit that they will be withheld from every payment on every invoice and the client pays the accumulated security deposits when the contract concludes (+2 years)
---
Here is an example:
I submit an invoice for $500,000
I get paid $425,000
Client withholds $25,000 as 5% Security deposit
---
I reconcile the accounts with my bank transactions, so I have a payment of $425,000 and an invoice for $500,000! The invoice is technically fully paid because $25,000 is a security deposit that will be paid at the end of the contract (+2 years).

If I create an invoice for $425,000 (without the security deposit),  I am left with the problem of recording the security deposit as an asset! How do I enter this?