Hess's law is applicable when the reactants are different than the products. In a chemical reaction there are rearrangement of atoms such that the chemical property of the reactant is different than that of the product.
Diamond and graphite are purely made up of C atoms with different arrangements of C atoms thus making them allotropes. Hess's law is not applicable for allotropes.