It is said that when the plates of a parallel plate capacitor connected to a battery are pulled apart to increase the separation, energy is absorbed by the battery and no heat is produced during this process.
For example, let us consider a parallel plate capacitor of capacitance $C$ with plates having area $A$ and separated by a distance $d$. Suppose the plates are maintained at a potential difference $V$ by a battery and the plates are pulled apart to increase the separation to $2d$, the capacitance reduces by a factor of two in accordance to $C=A\epsilon_0/d$. The energy stored in the electric field also reduces to half its original value in accordance to $U=CV^2/2$. I determined the work done by the external force which increases the separation to be half of the energy stored in the field initially i.e., $U/2$. The work done by the external agent increases the energy of the system.
Initially, an energy $U$ is stored in the field and after separation $U/2$ is stored in the field. The work done by the external agent increases the energy of the system by $U/2$. So, on the whole, the energy of the system must increase by $U/2+U/2=U$.
Why is this energy $U$ absorbed by the battery? Why shouldn't it be liberated as thermal energy (heat) as it happens during charging of a capacitor?
I read the answers to the following questions, but still my doubt on why should the energy be absorbed by the battery instead be liberated as heat exists: