That's not the right way to fix it!
If the joker valve can't let the water out of the bowl, the bowl will overflow...and keep on overflowing till it sinks the boat if allowed to to continue long enough.
The RIGHT fix: 1. Close ALL seacock when you leave the boat! Open seacocks when no one is aboard is a leading cause of boats sinking in their slips. But even if a hose slips off a thru-hull, water cannot get in through a closed thru-hull. If you are closing 'em, the head intake seacock is most likely leaking...which is what makes the 2nd step in the right fix VERY important on any boat:
2. Install a vented loop in the toilet intake.. Do NOT put it between the thru-hull and the pump...it'll prevent the pump from priming. It has to go between the pump and the bowl as shown in this photo. Priming a toilet pump--manual or electric starts a siphon. The vented loop is a siphon break that also puts an arch in the line far enough above the waterline to prevent water from getting over the top of it into the toilet bowl. The means it needs to be at LEAST 6-8" above the waterline AT ANY ANGLE OF HEEL, not just when the boat is at rest...which is why the one in the photo is so high. And btw, although the toilet in the photo is a Jabsco, installing an intake vented loop is the same for ALL manual toilets.
However, although a new joker valve is not the right fix for your problem, joker valves are important to the operation of all manual toilets and therefore should be replaced at least every two years--annually is better--as preventive maintenance. If it's been much longer than that since yours has been replaced, the slit in it will have stretched enough that it's no longer closed tight and may even have become a gaping hole. Or it may be encrusted with sea water minerals.