Removing clouds

Is there a way to remove the clouds from S2 images without changing the pixel values?

In case they’re thick clouds the only solution is to remove them by applying cloud mask IdePix, more information in the following post,

Source of the post

Once these cloud mask is applied the pixels are covered by this mask will convert to NaN, in case the clouds cover looks like sirrus or hazy, applying sen2cor and then sen2three could affect the pixel value of only covered area.

I think the same was asked (and answered) here: Cloud mask - SNAP sentinel 2