Liquidity Out Cost Basis Assigned to Wrong Token

I have lots of liquidity pool transactions. I have been able to work with it and get the cost basis as long as I use ‘Sent to Pool’ and ‘Received from Pool’ when staking and unstaking LP tokens. However, what sometimes happens is, in Liquidity Out transactions, what was the cost basis (during the Liquidity In event) for token A is assigned to token B and vice versa. I tried working with this and changing the order of the two Liquidity Out events but this won’t fix it.

Usually, the stable coin like the USDC ends up with the small cost basis so when I use it later I have a huge gain. I’d rather the smaller cost basis be assigned to the other token (not USDC) in the pair.

I found a workaround for this by deleting the liquidity in transactions and then manually entering them in the proper order so the cost basis will be correctly assigned.