This is a really deep question. My explanation will maybe be not so rigorous, but I hope it can help shed some light.
Let's start by saying that reversible work is indeed path-dependent, so it is not a state function.
Consider for example the two reversible transformations $A$ and $B$ in the picture:
They both are composed by an isobaric and an isochoric transformation, but it is easy to see that
$$W_A = P_1 (V_1-V_2)$$
while
$$W_B = P_2(V_1-V_2)$$
And since $P_2 \neq P_1$, it follows that $W_A \neq W_B$.
So why is this? Why does reversible work depend on the process? The reason is rather subtle and the confusion is generated by the mixing of thermodynamic and mechanics.
Let's start by observing that "non-conservative forces" don't exist. Leaving aside the nuclear force and the weak interaction, the only true forces we should be concerned about are the electromagnetic and the gravitational force, both of which are conservative (if we neglect general relativity effects).
When we talk about a "non-conservative force" we are only implicitly saying that we are not able to give a detailed enough description of the microscopic process, so that it looks like work depends on the path.
With thermodynamic it is exactly the same: for example, in the processes shown in the picture, the temperature of the gas changes throughout the process. Since temperature is proportional to the average kinetic energy of the molecules, this means that the average of the absolute value of the molecules' velocity is changing, so there must be some force acting on them. But of course it is impossible to know the explicit expression of such a force. So we are forced to say that there are "non-conservative forces" acting on (and in) our system.
Those "non-conservative" forces are taken into account in thermodynamics via the concept of heat. While in mechanics we have
$$\Delta U = -W$$
in thermodynamics we have
$$\Delta U = -W+Q$$
Basically, to restore the path-independence of the internal energy, we need to "hide" all the work done by microscopic "non-conservative forces" which are not under our control in an heat term $Q$. I stress that if we were able to write down every microscopic force we would not need the concept of heat at all.
This is even more clear if we consider that for an adiabatic process, in which there can be no heat exchange, we have
$$\Delta U = -W$$
i.e. in this case work is path-independent.
So this is why in the above example work is path-dependent: macroscopic work depends on the path, because the amount of microscopic work (that is to say, heat) exchanged is different in the two processes.
To sum up:
In thermodynamics, we call "work" ($W$) the macroscopic work, i.e. the work we can measure (for example the lowering/raising of a piston). But, even if the transformation is reversible, we will observe that $\Delta U = -W$ does not hold. This is because, even in the absence of macroscopic dissipative effects (which would make the process irreversible) there are microscopic forces that are not under our control acting in the system. It is like friction in mechanics: we know that it ultimately comes from electromagnetic interaction, which is conservative, but since we aren't able to describe it microscopically, it looks like it is a "non-conservative" interaction. So we solve the problem by adding an "heat" term, representing microscopic, unknown work: $\Delta U = -W+Q$. The result is that reversible work will depend on the path, exception being some particular cases, for example the adiabatic case, in which $Q=0$, so that $\Delta U = -W$ and $W$ is therefore path-independent.