I tried to call the api to upload the text, but it did not upload the metadata to the file content. I tested it locally and there should be no problem. Can you tell me your operation process? This is my test result:
----------
Update:
It has been confirmed that this is by design. When you upload a file in onedrive/sharepoint it adds the metadata - by default.