Date: 6 Nissan 5599
From: Rabbi Moshe Sofer
To: Rabbi Yosef Yoel Deutsch
The Chasam Sofer rules that it is permissible to write the Divine Name on a parchment patch used to repair a Sefer Torah, and that the resulting Torah is valid. He demonstrates that the Shach in Yoreh Deah 275 explicitly permits this, and dismisses the prohibitory opinions of the Chinuch Beis Yosef and Zikaron Yosef as lacking substantive reasoning and overlooking the Shach's position.
Source: Shu"t Chasam Sofer YD §259