A Payment record debits the AP account(s) that was credited on the associated Invoice record. From that, it will know how much, and by what distribution to credit the Cash Account. You may see that the distribution on the Payment doesn't seem to match the distribution on the Invoice.
Select the Adjustments tab of the Invoice record and view the Previous Distribution tab to view the original distribution from when the Payment was created.
If you need the Payment distribution to match the Invoice's new distribution, void and purge the check and recreate it using the same number.