I understand that the work function is sensitive to the surface. But I don't understand how that doesn't violate energy conservation given the following scenario:
Suppose there are two electrons at the Fermi level. A photon comes in with energy $\hbar\omega$ and hits one of these electrons. The photon had momentum such that the electron goes off in a certain direction and through surface A, thereby it has kinetic energy $\hbar\omega - φ_A$ and has potential energy $E_{vac}$. Now another photon comes in, with equal energy, but momentum in a different direction such that the electron it hits is sent off in a different direction so it leaves the crystal through surface B. Now this electron has kinetic energy $\hbar\omega - φ_B$ and has the same potential energy of $E_{vac}$. Does conservation of energy not require that the two work functions are therefore equal?
i.e. the two electrons start in the same state, are both excited by photons of equal energy, then both finish at the vacuum level but supposedly have different energies due to the particular surface that they were ejected through.