Ensure that the edges are properly sealed, and avoid overheating the oil to prevent the khoya from leaking while frying.