Let us consider a liquid drop which is about to be forced out of the hole of radius \( r \) has a hemispherical shape, then \( \frac{2T}{r} \) will be the excess pressure inside the drop, where \( T \) is the surface tension of the liquid.
The pressure of the liquid column is \( h\rho{g} \), where \( h \) is the height of the liquid column, \( \rho \) is the density of the liquid and \( g \) is the acceleration due to gravity. Here \( h>>r \).
So in equilibrium condition,
\( h\rho{g}=\frac{2T}{r} \)
Therefore, \( \displaystyle{h=\frac{2T}{rg\rho}} \)
When the height of the liquid vessel is greater than this height \( h \), then the hydrostatic pressure can not be balanced by the surface tension of the liquid. As a result, the liquid will come out through the hole of the vessel until the height of the liquid in the vessel become equal to that \( h \).
For the same reason, no liquid could enter the vessel until its bottom is taken inside the liquid of a depth greater than \( h \). The liquid surface which is trying to enter through the hole would be convex upward. The hydrostatic pressure upto the depth \( h \) inside the liquid would be balanced by the excess pressure inside the drop. When the vessel is taken to a depth greater than \( h \) then the liquid will enter through the hole because the excess pressure inside the drop can not be balanced by the hydrostatic pressure.