P&L account not closing into RE; 2 Balance sheets closing into RE

Hi everyone.
We’ve just finalized our 2023 tax returns and in reviewing the closing balances to opening 2024 I found a P&L account that did not close out into retained earnings. Just as odd, I have two balance sheet accounts that automatically closed out to retained earnings.

Can you point me to what settings might be wrong? The account segment and the g/l account appear to be correct. The categories are also correct but perhaps there is another mapping?

Thanks in advance for your ideas.