CORE allows you to apply retainer payments to client invoices. You can also set the Auto Apply Retainers option at the global, project, or even invoice level to automatically apply the retainers on invoices, when available. Do note that this option works on the invoices if the retainer is applied to the parent project.
If you do not want to apply any retainers to the invoices automatically, then make sure not to select the Auto Apply Retainers option. If you do not want this rule for all projects, then it should be unchecked in Settings > Billing & Invoices. If you want the rule on a specific project, you can add that rule on the Projects > General > Assignment screen.