Hello léonie.
Thanks for your reply and for the shared article. It is very interesting. I had the Active D-Lighting configuration activated but the rest is in default settings. No built-in effects or similar.
I have just right now tested shooting with D-Lightning OFF and also Picture Control in Standard instead of Auto, just in case. Regretfully there is no improvement of the issue. Nevertheless, even if this would have solve it, it is a RAW image, and that means there are no adjustments applied to it on the camera side. As you explained, the camera adjustments would change the ISO, aperture and speed values, but the final picture, correctly or incorrectly exposed, would remain a RAW picture, without filters.
Also, remember that this very same camera, with the very same settings, has been producing pictures without issues until the arrival of Mac OS Sonoma. That makes difficult to look for a solution on the camera settings side.
You write that the RAW file has been heavily underexposed. What makes you write that? I tend to lower the exposure 1/3 when taking my pictures, because it is always possible to recover shadows and not possible to recover burnt parts. But the example picture is not heavily underexposed, or even lightly underexposed. You see in the histogram that most of the pixels are on the bright side. Maybe I'm missing something?
If you are writing about the third capture in my post, where you see an underexposed picture, that is the result of applying the Retouch tool. That is the problem being caused by the Photos app.
Regards.