Massive compact galaxies seem to be more common at high redshift than in the local universe, especially in denser environments. To investigate the fate of such massive galaxies identified at z~2 we analyse the evolution of their properties in three cosmological hydrodynamical simulations that form virialised galaxy groups of mass ~10^13 Msun hosting a central massive elliptical/S0 galaxy by redshift zero. We find that at redshift ~2 the population of galaxies with M_*> 2 10^10 Msun is diverse in terms of mass, velocity dispersion, star formation and effective radius, containing both very compact and relatively extended objects. In each simulation all the compact satellite galaxies have merged into the central galaxy by redshift 0 (with the exception of one simulation where one of such satellite galaxy survives). Satellites of similar mass at z = 0 are all less compact than their high redshift counterparts. They form later than the galaxies in the z = 2 sample and enter the group potential at z < 1, when dynamical friction times are longer than the Hubble time. Also, by z = 0 the central galaxies have increased substantially their characteristic radius via a combination of in situ star formation and mergers. Hence in a group environment descendants of compact galaxies either evolve towards larger sizes or they disappear before the present time as a result of the environment in which they evolve. Since the group-sized halos that we consider are representative of dense environments in the LambdaCDM cosmology, we conclude that the majority of high redshift compact massive galaxies do not survive until today as a result of the environment.