It is important to keep track of what all the symbols mean in a formula. What you wrote is the work energy theorem. It is often given for a classical point particle which has no internal energy. For such a particle $E=T$ (note that $U$ is external to the particle) and there is no ambiguity.
If you have a more complicated system which does have some form of internal energy then the work energy theorem is a little ambiguous. To clarify, it should be written $$∆T = \int_a^b\vec F_\text{net}\cdot d\vec s_\text{CoM} = W_\text{CoM}$$ where CoM indicates the center of mass and $F_\text{net}=\Sigma_i F_i$. So the position $s$ specifically refers to the center of mass and the work is not the total work done but just the work done on the center of mass by the net force (often this is confusingly called the “net work” which is confusing because it is not the same as the total work).
Now, for a system with internal energy we have a different expression which describes the total work: $$∆E = \Sigma_i \int_{a_i}^{b_i} \vec F_i \cdot d\vec s_i = W_\text{total}$$ where $i$ enumerates each of the external forces. This is the expression to use when considering a system with internal energy also. It allows for changes in KE as well as PE.
For example, consider a system consisting of a spring of mass $m$. Let the spring be placed against a wall and then the spring is compressed from equilibrium at a constant rate by a force at the opposite end for a distance $d$.
Since the rate is constant the CoM is not accelerating so $F_\text{net}=0$. Then $W_\text{CoM}=0=\Delta T$
Since the wall does not move the work from the force at the wall is 0 so $W_\text{total}=\int_0^d kx \ dx = \Delta E$. So $\Delta U = \Delta E - \Delta T = \Delta E$ as expected physically.