Installing mailserver SSL automatically resets postfix hostname?

The SSL certificate for the mail server should not be issued repeatedly; it should only be issued for the domain against which your RDNS is set. If you watch the referenced video, I have explained this in detail → Achieve 10/10 Email score with CyberPanel!

Additionally, if you are trying to issue the certificate for configuring an email client, that follows a different procedure. CyberPanel handles this configuration automatically. For more details, you can refer to this article. → 6 - Self-signed SSL error on Outlook/Thunderbird