Stellar members of binary systems are formed from the same material, and therefore they should be chemically identical. However, recent studies have unveiled chemical differences between the two members of binary pairs composed of Sun-like stars. These chemically inhomogeneous binaries represent one of the most contradictory examples in stellar astrophysics and a source of tension between theory and observations. It is still unclear whether the abundance variations are the result of inhomogeneities in the protostellar gas clouds or are due to planet engulfment events that occurred after the stellar formation. The former scenario undermines the general belief that the chemical makeup of stars provides the fossil information of the environment in which they formed, whereas the second scenario would shed light on the possible evolutionary paths of planetary systems. Our study provides compelling evidence in favour of the planet engulfment scenario. We also establish that planet engulfment events occur in Sun-like stars with a 20–35% probability. Therefore, an important fraction of planetary systems undergo very dynamical evolutionary paths that critically modify their architectures, unlike our calm Solar System. This study opens the possibility of using chemical abundances of stars to identify which ones are the most likely to host Solar System analogues.