The actual upload limit is 4mb which is because the largest value a JSON string can be is 4mb, the guidance around 3MB is because Base64 encoding bloats a message from its binary size by up to 33% so a file size below 3MB should mean once encoded your not going to have a problem. But you always need to go off the encoded size rather the binary size.
MS-Graph Attachment limits
Rajat M Jain
41
Reputation points
The attachment limit of 3MB applies to the attachment content or the base64 encoded attachment contents?
In other words, is it allowed to POST an attachment to a message in Microsoft Graph when the base 64 encoded contents are more than 3MB but the actual file is less than 3MB?