There are 4 functions here: Save, Export JPEG, Export for web/print, and Export DNG.
Let’s start with Save. If you’re editing a RAW file, changes are saved to an XMP sidecar. If you’re editing a DNG however, changes can either be saved to the DNG itself or to a sidecar. The decision is automatic. If a sidecar already exists for the DNG, I use the sidecar. If the DNG came from directly from a camera that shoots DNGs, I use a sidecar. Otherwise, I’m supposed to update the DNG itself, embedding the XMP, and updating the preview. This is what I intended to do, but I may have messed it up. For instance, if you have the RW2, the DNG, a JPG and an XMP all in the same folder, I may not know if the XMP is a sidecar for the RW2, the DNG (or even the JPG).
Export JPEG is the highest quality output you’ll get. It’s an 8-bit sRGB JPEGs, no chroma subsampling, quality 8 (“High”, or 86%). I erroneously reported it as quality 10, it’s closer to 8 after further investigation. I can’t do better than that, sorry. It’s all I have to work with. It should, however, include all relevant metadata, and if it doesn’t, that’s a bug, and I can probably fix it.
Export for web/print is always lower quality than the above, because the source is the JPEG file above. Yes the file size can end up being higher, the same way as if you open a JPEG in Photoshop, resize it, and save it at an higher quality the file can grow (but you gain no quality in the process). This is meant to take a 20MP image, and downsample it for the web, or a 10x15 print. These JPEGs always have 4:2:2 chroma subsampling, and no metadata. I can improve this, but given the purpose, I’m not sure if it’s worth the trouble.
Export DNG exports a DNG from RAW, embedding the XMP, and updating the preview, and doing its best to preserve all metadata (even some stuff DNG Converter destroys).
This is the intended behavior, but there might be bugs, obviously.
The output quality is sufficient for me, but all I do is upload the JPEGs to Google Photos, enjoy them on my 4K TV, and (very rarely) order a 10x15 or 15x20. This means I can do a few basic edits, save some otherwise dull photos, and if it gets hard (or if I want to print big), I hand the DNG/XMP to the experts (my wife, or the store, they actually print DNGs).
I love photography, cameras, lenses, rendering… editing is my least favourite part of it. I’m obviously not going to dethrone Adobe with this attitude, eh?