I think I’ve figured out the reason: the cloud mask function removes many images with clouds, which reduces the amount of available data. The availability also varies across different regions depending on cloud conditions. The code works if we retrieve one image from every two months instead of one.