We know the basic Thermodynamic equations are:
$$ dU=-PdV+ TdS + \mu dN$$
$$ dH=dU+d(PV)= TdS+ \mu dN + VdP$$
we typically assume constant Pressure for a reaction carried out in air and neglect the dP term
$$dG=dH-d(TS)= \mu dN + SdT+ VdP$$
once again we neglect the dT and dP terms
but for heat of reaction we use the enthalpy not just the TdS term. When we have a battery though the electrical energy is the Gibbs free energy with the heat of reaction being TdS and other energy losses also contributing to the heat. When the reaction is not separated (not an electrochemical cell) then the Gibbs is part of the heat.
For a typical reaction where the chemicals are in contact why do they use the enthalpy to determine the heat of the reaction produced?