The key is that the bottom block is actually moving and is not held fixed like the ground typically is (here I am asusming $F$ is applied to the top block).
Elaborating on my comment:
Your acceleration "$a$" is with respect to the ground. The equation $F-F_{sf}=m_1a$ shows that the reason you can accelerate is because $F_{max}>F_{sf}$, and this is accelerating with respect to ground, not with respect to the bottom block.
In particular, if you held the bottom block in place (treating it as the ground), then yes kinetic friction would kick in, but now your equations would be different (because $a_{bottom}=0$ and $a_{top}>0$).
In my opinion, the requirement that the string be nonextensible creates conceptual issues.
On the one hand, it is stated that the string is nonextensible. On the other hand, it is stated on the diagram the "External force $F$ is applied such that the block remains at rest". The problem is if the string is nonextensible, and initially has no slack, then the block cannot move to the left, i.e., it will always be "at rest", regardless of the force $F$ to the left.
But more importantly, it makes it difficult to explain (1) why the static friction force counters the applied force before the tension in the string and (2) why when equilibrium is reached the friction force no longer exists.
To facilitate the answers to these questions I will replace the string with an ideal spring (see the figures below). An ideal spring, like the string, is massless. But unlike the string, it is extensible to the degree allowed by the spring constant. The magnitude of the tension in the spring is equals the magnitude of its restoring force, or $T=k\Delta x$ where $k$ is the spring constant and $\Delta x$ is its extension beyond the "relaxed" stated.
Now consider the following where the block is considered a rigid (nonextensible) body:
The spring, like the string, is initially relaxed so there is no tension. FIG 1 shows the block with no external force and the relaxed spring attached to the wall
In Fig 2 we gradually apply an increasing external force $F$ that is less than the maximum static friction force. Since the block cannot move, the spring cannot extend and thus the tension in the spring is still zero. This explains, for a physically real scenario, why the applied force $F$ is countered first by the static friction force.
In FIG 3 the applied force reaches the maximum static friction force and the friction force becomes kinetic friction, which is generally considered constant. Since kinetic friction is usually less than static friction, if the applied force $F$ is maintained at the value of the maximum static friction there will initially be a net force to the left causing the block to move to the left. (Note that actual value of the friction force during the transition from static to kinetic is undefined for the standard model of friction). At the same time, however, the spring extends creating an opposing tension force. So during this phase before the extension of the spring is a maximum, we have
$$F-f_{k}> T$$
$$\mu_{s}mg-\mu_{k}mg>k\Delta x$$
and the block is moving to the left.
- When the extension of the spring is such that the tension in the spring equals the applied force $F$, it's extension is maximized and we have
$$F=T=k\Delta x_{max}$$
Substituting into the first equation,
$$f_{k}=0$$
Meaning there is no net force for friction to oppose.
Note that in this example, the stiffer the spring (the greater $k$ is) the less the block needs to move before the tension equals the applied force, i.e., the quicker the tension rises. The nonextensible string is simply a spring with an infinite $k$.
Hope this helps.
![enter image description here](https://i.stack.imgur.com/lJfWG.jpg)
Best Answer
To provide a constant force of 5N you need to speed up with the block. Imagine pushing a car. Your 5N accelerates the car until it is moving at the same speed as you, so unless you speed up yourself, you can no longer apply the force. If you could, then eventually the car will be travelling faster than you and pulling away from you!
You should replace pushing the block and associated running on a friction less surface problems with a motor/fan/propeller on the block supplying the 5N force.