Fundamentally, I think it's because you are treating your equation as broader than it really is. It's pretty obvious that it does not apply properly if the RHS is such that V<0 which is the case where the object is floating in the air above the liquid. It very specifically only applies to scenarios where the object actually floats in the liquid partially submerged, that is $\rho\leq\rho_f$. If $\rho\geq\rho_f$, the dynamics of the system (which are not accounted for in the energy equation) lead it away from this scenario and it no longer applies.
So you either need to restrict that equation so it only applies when $V>0$ which, you know from experience is when $y>=0$ or$a>y>0$ and $\rho\leq\rho_f$.
If you wantThe way the energy equations to more blindly work itself out for you then I think you need to write it for, they are only applicable under conditions where the case of an object floating aroundis in contact with the boundary layer between TWO different fluids of two different densities. ThenIf you fiddle with parameters so the result in that case,eternally sinking to the bottom or eternal floating to the surface (such as if you set the density ofobject were placed at the upperboundary between a fluid to zero, I thinkof higher and lower density) then it should work itself out the way you expectno longer applies.