From: Rabbi Moshe Sofer
To: Rabbi Shlomo Katz
A Sefer Torah contained "Elokeichem" where "Eloheihem" was required, and a local scribe claimed the kaf could be modified into a hei to correct the error. The Chasam Sofer rejects this entirely, arguing that any reasoning permitting erasure of the kaf (on grounds the Name was written in error and thus unsanctified) equally undermines the sanctity of the remaining mem, making the proposed correction self-defeating and worthless.
Source: Shu"t Chasam Sofer YD §274