Proton spectral functions in finite nuclei based on the extended Brueckner–Hartree–Fock approach