hello Marleyuk,
I still can't see any details of your design but what if you extended the drain line up through the bottom and set it to the water level you wanted. Then made some tiny holes inside on the drain line farther down where you wanted the water level when the
pump was shut off. That way the water will fill to the level you wanted and will only empty when the pump is shut off.