Payment entry allocation bug v.12.6.0

Dear all I have a big problem in the payment entry form
if I have an invoice with an outstanding amount 1000
and create payment entry for my customer or supplier and allocate his invoices the mentioned invoice will be allocated and payment entry still draft
if I create another payment entry for the same customer or supplier and allocate the mentioned invoice allocated again
and when submit all payment itis become negative outstanding !!