To give a short formula based answer, solving for $S$ from the equation:   $v^2 = u^2 + 2as$  and substituting it into the equation:   $W = fs$   gives      $W = \Delta KE$. Which is true based on the work energy theorem.  Consider that we used an equation that defines $S$ in a context of constant acceleration. So, we used the displacement that is covered during acceleration, not constant speed. Therefore, the $S$ in the definition of work is displacement during the period of application of force, which is the period of acceleration where the kinetics energy changes because of change in velocity. This brings the harmony between the basic definition of work done  and the work energy theorem. In other words, the work energy theorem tells us exactly which displacement is there in the definition of work done. But we need some further explanation on what happens when there is resistive force like gravity or friction.