Generally speaking (without need to refer to your particular problem), the sign of the free energy change and thus the magnitude of maximum possible work does not depend on $\Delta H$ or $\Delta S$ alone, it depends on the combination:
$$w_{\mathrm{max},\text{non-}pV} = \Delta G = \Delta H - T \Delta S.\tag{1}$$
This equation describes the maximum amount of non-$pV$ work that can be obtained from the system or minimum amount that needs to be done if the process is performed reversibly at constant $T$ and $p.$ In addition, when work other than mechanical $(pV)$ is performed, the value of $\Delta H$ is no longer equal to the heat evolved, in fact then $\Delta H = q_p + w_{\mathrm{max},\text{non-}pV}.$ Finally, it remains that at constant $T$ the entropy change of the surroundings is related to the amount of heat evolved as
$$\Delta S_\mathrm{surr} = \frac{-q_p}{T}.\tag{2}$$
This allows the above to be rewritten in terms of entropies of the system and the surroundings (at constant $T$ and $P):$
$$w_{\mathrm{max},\text{non-}pV} = w_{\mathrm{max},\text{non-}pV} + q_p - T \Delta S = w_{\mathrm{max},\text{non-}pV} -T(\Delta S_\mathrm{surr} + \Delta S_\mathrm{sys}) $$
Removing the cancelling terms we conclude that
$$\Delta S_\mathrm{surr} + \Delta S_\mathrm{sys} = 0\tag{3}$$
that is, the entropy of the universe remains constant, which is consistent with reversibility.
That clears up the question of how it is possible for a process to be formally endothermic (in the sense that $\Delta H > 0$) and yet heat is released $(q < 0).$ This does not however explain why the net process of glucose generation by photosynthesis, assumed ideal (amongst other things reversible) generates heat.
The answer is that the released heat is responsible for an increase in the entropy of the surroundings which offsets a reduction in the entropy of the system when glucose is generated, which can be shown by writing
$$\Delta S_\mathrm{sys} = -\Delta S_\mathrm{surr} = \frac{q_p}{T} < 0\tag{4}$$
Without that increase in the entropy of the surroundings life would not be possible.