You can easily disable Theme Builder Template Editing from the Divi Builder's options.
Begin by enabling the Divi Builder for any page or post where you want to disable Theme Builder Template Editing.
After enabling the Divi Builder, you will see the three-dot builder button located at the bottom of the page. Click on it to reveal a dropdown menu.
From the dropdown menu, select "Builder Settings" to access the settings panel.
Within the Builder Settings panel, you'll find various options and settings related to Divi Builder. Look for the "Full Site Template Editing" option.
Now, toggle off the "Full Site Template Editing" option and save the changes and it will disable the ability to edit the Theme Builder templates.