Lets say a exothermic reaction is happening in a constant pressure calorimeter. This reaction releases energy as heat($q$) and work($w$) (done to expand its volume against atmospheric pressure). The energy for work comes from kinetic energy of molecules i.e. from heat released.
So effectively "the energy used to raise the temperature of water the calorimeter"($q_o$) is less then the actually heat released($q$) as some of the energy from it is "wasted" in expanding($w$), hence the calorimeter measures this new energy which is $q_o=q-w$.
Now $\Delta H$ at constant pressure is equal to actual heat released($q$), hence if we want to measure $\Delta H$ from calorimeter we must add the wasted energy($w$) to energy released measured by calorimeter($q_O$) i.e. $\Delta H=q_o +w= q-w+w=q$.
But in all the books I read$^1$ it is written that $\Delta H=q_o$, that is change in enthalpy equals to heat measured by the calorimeter, but this clearly is wrong according to me. But since it is written in many books that means they are correct hence I am wrong but I cant see my mistake, so help me. Thanks.
1: Some internet refrence: