Isometries in spaces of K\"ahler potentials