If I take the screenshot in such a way that only the email body is shown, but not the area where the sender and receiver addresses are shown, then the upload is successful.
So, I believe they are using some form of image recognition algorithm when you upload the screenshot to Teams.