The jpeg file format specification does not allow 16-bit color depth, layers, transparency, hidden pixels, masks, alpha channels, etc. There isn't much the jpeg format actually allows.
If your file has any of this, it is not possible to save as jpeg. Then you get a copy with this data thrown out.
Note that in this case, the original file is still open, and you need to save that to a format with the necessary support.