This is inaccurate in at least 2 ways.
“The defect fails to switch off” is a mischaracterization of what we know. There is no “defect” in any biological sense of the term. The mutations (variants) that we know of (and there are likely others that we don’t know of yet) lie outside the lactase gene, in a control region. The most famous of these mutations is a gain of function: the promoter is more active with the mutation than without. (See this abstract or any review of the topic.)
So: at least for the most well-understood mutation, it’s not in a gene and it’s an increase in function.