Child form not able to hold C# Code

Without goign deep at the moment, I observed that the customization code that I write in the Child Form (Print Preview > Email Window) doesn’t stay, however, this saves well. any one experienced it ?

Epicor Version: 2021.1.9