Let’s have the block as one system and the ground as another, so that friction is an external force for both. I find it easier to think in terms of power than directly in terms of work. So let’s be explicit, in terms of $v_0$, $m$, and $F$, in the ground frame we have the velocity of the block is $$v(t)=-\frac{F}{m} t + v_0$$ for $0\le t \le t_f = v_0\ m/F$ and the velocity of the ground is $$V(t)=0$$
Then the mechanical power entering the block is $$p(t)=-F \ v(t)=\frac{F^2}{m}t-v_0 F$$ which is always negative meaning that mechanical power is leaving the block.
The mechanical power entering the ground is $$P(t)=F \ V(t)=0$$ meaning that no mechanical power is entering the ground.
So we have mechanical power leaving the block but not entering the ground. That difference in power is the source of heat. $$\dot Q(t)=-\left(P(t)+p(t)\right)= -\frac{F^2}{m}t+v_0 F $$
Now, switching to another frame is easy. In the new frame we simply subtract $v_0/2$ from all velocities and recalculate all quantities of interest. The new velocity of the block is $$v(t)=-\frac{F}{m} t + \frac{v_0}{2}$$ and the new velocity of the ground is $$V(t)=-\frac{v_0}{2}$$
Similarly the new mechanical power entering the block is $$p(t)=-F \ v(t)=\frac{F^2}{m}t-\frac{v_0}{2}F$$ which is negative at first, meaning that mechanical power is leaving the block, but becomes positive at the halfway point, meaning that the kinetic friction force does work on the block.
The new mechanical power entering the ground is $$P(t)=F \ V(t)=-F \frac{v_0}{2}$$which is constant and negative, meaning that mechanical power leaves the Earth at a steady rate through the whole experiment.
The new heat is given by $$\dot Q(t)=-\left(P(t)+p(t)\right)= -\frac{F^2}{m}t+v_0 F $$ which is the same as previously found for the ground frame.
So although the various velocities and power (work) values are different, the heat is the same in both frames. This is because mechanical work on the earth is non-zero (negative) in the moving frame, and it is this mechanical energy which is transferred to the block and accounts for the increased energy of the block without any decreased heat compared to the ground frame.
The work energy theorem can be applied to the ground to ensure that the Earth lost KE in the moving frame to account for the extra energy given to the block.