Took me over two months to solve the issue.
If you have ever logged in with a different account in testFlight, there is a big chance that testFlight is still trying to use that account to redeem the code. This happens despite testFlight showing the right user logged in.
Try to invite that user from the app store connect console instead, and redeem the code in testFlight.
Two months talking to customer service and I had to find out myself ...
Topic:
App Store Distribution & Marketing
SubTopic:
TestFlight
Tags: