OK, I think I got it figured out.
When you create the order, it is not in invoice yet.
After you create the order you have to convert it to an invoice.
Then the invoice shows the correct balance with the prepayment applied.
This also fixes the problem in my other post about reports.