There are two things to check. First, check that the stopper at the bottom is in good condition. If in doubt, change it, which is easily done. Also check that the chain from the float to the stopper is not hanging down in the drain under the stopper. If all those are okay, check that the small hose that fits in the overflow pipe, which fills the tank, is not sticking down in the water once the tank is full. If it is, it can siphon water back out. If this problem exists, cut the hose shorter and/or bend the float arm down so a little less water goes in the tank. Make sure you keep the refill hose clipped to the overflow spout so it won’t work loose and spray everywhere.