Why does lighten change the color of the dark part in mix rgb?
Lighten = pick the highest value color
As shown in the manual:

Blender is using the transformations as described in the Gimp specifications:

Lighten only mode compares each component of each pixel in the upper
layer with the corresponding one in the lower layer and uses the
larger value in the resulting image. Completely black layers have no
effect on the final image and completely white layers result in a
white image.

So it's basically using the highest value color, thet's why it's more probable to affect the darker areas as your shadows
https://docs.gimp.org/en/gimp-concepts-layer-modes.html