When you edit a photo in lightroom, the original file is not changed at all. Lightroom (Like Photos) is a non destructive editor. The edits are recordeed as a list of instructions rather than changing the underlying image data. When you export, those instructions are applied to the raw file to create a final jpg (or other format image)
But it is actually not possible to create an edited raw file. A raw file always holds the raw data exactly as it was out of the camera. That is what raw means.
When you export a raw file with edits, the raw file is exported unchanged and the edits are listed in an xmp file - but again - that is just a list of instructions - which are not compatible with photos.
It might also be possible for the edit list to be embedded in the DNG file - but again that is as a list of instructions, not as edited image data.