Tax loss harvesting to offset realized capital gains

Hi. I am selling some sizable stock (from taxable brokerage account) this year to prepare for paying cash for an upcoming new home purchase. I've already taken one distribution with a net long-term capital gain of roughly $43,000. I could take another distribution now that would have a net long-term capital loss of roughly $23,000. I know there is a $3,000 annual limit to tax loss harvesting applying to one's ordinary income. Does the same limit apply to the $43,000 in gains that I've already realized this tax year, or would I be able to net out the $43,000 gain with the $23,000 loss and end up with a net taxable gain of $20,000? Thank you for your insights.