I found the source of the problem.
I manage several applications for different clients and for these applications I use my company's Apple ID. I also have a personal Apple ID for more convenience I use this account as a test account for my applications.
In Xcode my company's Apple ID is registered for client apps and my personal Apple ID is also registered for my personal projects.
Following a problem with a customer account, I deleted and restored my Apple ID accounts in Xcode by registering my personal Apple ID first and then my professional Apple ID.
And that's where I had the problem because when I try to send a new version of a client application to TestFlight, I get the message "You do not have required role to perform an operation"
Concretely, Xcode takes my personal Apple ID account, which is not a developer, for client projects instead of taking my professional Apple ID, which is admin on client environments. Xcode doesn't seem to select the correct account for uploading to TestFlight.
The solution was to remove the Apple ID accounts from Xcode and then add the professional Apple ID account first and then the personal Apple ID account.