If I need to withdraw or recharacterize contributions to a regular or roth IRA, should I use the contribution amount, or the contribution amount gains/losses?

I recharacterized a traditional IRA contribution to a Roth in my 2019 tax year and my brokerage just moved shares, which included a small capital gain and pushed the recharacterization just over $6K. As O go to amend my 2019 return, TT now says I overcontributed to the Roth.  Is that correct? We need to do a similar recharacterization for my wife for 2020, and I don't want to repeat any penalties I am incurring here.