Hi - I'm not an accountant, and you'd want to be sure with your accounting team how and where you'd want to do all this...
but here goes...I assume you issued an invoice from Project1, and the customer paid that invoice?
It sounds like in Project2, you might want to basically have a pre-payment or retainer. That way, you would have that $20k "on account" in Project2...eventually you can invoice against it. These instructions will help with doing the $20k retainer on Project2:
Create an ad hoc advance on a project contract | Microsoft Learn which you will then invoice to the customer...you don't have to deliver the invoice since you already have sent a $100k bill out to them. Your accounting/cash app team can then apply some of the $100k payment to the $20k retainer invoice, or if that $100k is already applied, can make adjustments to settle. Effectively you want to credit memo $20k to the first project and invoice $20k on the second project...nets to zero.
The system would kindof automatically manage that retainer amount, so test it out. It may try to kindof top-off the retainer periodically, depending on your setup.
If you prefer to avoid the retainer concept, you can pretty much do the same thing by using a fixed-price approach to create the on account transactions...it mainly depends on how you want to track/consume that $20k.
You can also use a journal, for example you could use a fee journal on Project2 to "charge" a negative amount, offset to the appropriate g/l...depends on accounting guidelines for your company. That will create a credit on the project. You don't want to invoice that credited amount or refund the customer (which a retainer would help you to avoid doing).
With any of the credits that would end up on the project, you will likely want to eventually invoice various things to clear them out...so once there are $20k in hours/expenses/fees/items, you would want to create an invoice proposal, and then include your credit "on account" amounts, which will net out the $20k, or parts of it.