A user attached a Word document to an Apple Mail email from his desktop, then opened it from Apple Mail with MS Word, made multiple changes and saved it by clicking File > Save. He then closed the document and was surprised to find that the changes he made were not present in the attached document, nor in the original file saved on the desktop.
Although this may sound like a bug or an unexplained "computer lost my file" mystery to the end-user, in fact, this is expected behaviour. File opened from Apple Mail is copied to a hidden temporary folder and any changes are saved to that file rather than to the original.
Most sources I found online suggest that the folder where such files are saved is: ~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads. However, in this case, I could not find the document in question there. Most likely the location changed after one of the macOS updates. To track the file I opened MS Word, went to File > Open and checked the Recent section. As expected, the edited file was there and it was saved in an even more obscure folder: /private/var/folders/1l/_lqwvbk65232h2mmstr67kfn0000gm/T/com.apple.mail/com.apple.mail/compose/attach
macOS Big Sur 11.6
Microsoft Word for Mac 16.62