Clustering properties of galaxies selected in stellar mass: breaking down the link between luminous and dark matter in massive galaxies from z= 0 to z= 2