LaAlO$_{3}$ and NdGaO$_{3}$ thin films of different thickness have been grown by pulsed laser deposition on TiO$_2$-terminated SrTiO$_{3}$ single crystals and investigated by soft X-ray photoemission spectroscopy. The surface sensitivity of the measurements has been tuned by varying photon energy $h u$ and emission angle $Theta$. In contrast to the core levels of the other elements, the Sr $3d$ line shows an unexpected splitting for higher surface sensitivity, signaling the presence of a second strontium component. From our quantitative analysis we conclude that during the growth process Sr atoms diffuse away from the substrate and segregate at the surface of the heterostructure, possibly forming strontium oxide.