Deterministic equivalent for the Allen-Cahn energy of a scaling law in the Ising model