All edits in the Photos library are saved to the library's database and applied to the preview jpeg wherever it appears in the library. The original file is untouched and can be referred to as the digital negative.
The only time any compression is applied is when the photo is exported out of the library as an edited photo. Then you have the option to save it to 4 different compression levels:
The JPEG Quality level Maximum produces a jpeg file that actually a bit larger than the original JPEG file. I have no idea why. The Large level produces a file size just a but smaller.
If you want to maintain totally lossless images you can export the edited version as a Tiff file. But you'll pay a huge price is used disk space. For a 2448 x 3264 jpeg that was originally 2.9 MB that is exported as Maximum you'll get a file size of 8.7 MB (Large will get you a 1.8 MB file size). If you export that same file as a Tiff you'll get a 24 MB file, 8 times the original jpeg file size.
This web page, https://sirv.com/help/resources/jpeg-quality-comparison/, is a good treatise on compression and image quality.