That there is a fringe electric field outside a parallel plate capacitor can be seen from the result of a computation done using the finite difference method.
The electric field strength is indicated by the colour of the shading with red as strongest and blue a weakest.
Note that the electric field is roughly uniform between the plates and this computation was done to "exaggerate" the external electric field by making the separation of the plates comparable to their length.
In your problem the external field due to the charged plates induces temporary dipoles or influences permanent dipoles in the liquid.
The electric field near to top of the liquid between the plates $(WX)$ is uniform and horizontal and so there is no net upward force on the liquid as you have noted.
However near the edges of the capacitor plates $(YZ)$ there is a force $F$ on the dipoles with an upward component.
It is such forces which are responsible for the liquid rising inside the capacitor.
The significance of the fact that the potential across the capacitor plates $V_0$ is constant must not be ignored.
To maintain a constant potential difference across the plates some charge $dQ$ must flow to increase the charge stored on the capacitor and the work done by the battery to do this is $W_{\rm battery} = V_0\,dQ$ where $dQ=d(C\,V_0)$.
As the liquid is "pulled/pushed" into the capacitor by an increase in height of the liquid within the capacitor of $dx$, the capacitance of the capacitor increases and so there is an increase in the energy stored in the capacitor of $dU= d(\frac 1 2 CV_0^2)$
Finally the force $F$ moves a distance $dx$ and so the work done is $W = F\, dx$.
Use the conservation of energy to relate these terms to get the required relationship.