I remember reading about one of the skin cancer finding ML models that was developed. Most of the pictures from malignant moles were taken from a specific office and the algorithm was picking up on the lighting in that room rather than other differences in the mole to determine likelihood of it being cancerous. It did a great job of identifying photos based on the type of lighting used, but was overall less effective at predicting cancer.