Even if a person sins, even if it's one of the worst sins, being close to a prophet affects him. Although there was the sin of the golden calf, when there is communication between Moses and the nation, they can still learn from him without being afraid of the light shining from his face.