For some reason, the configured web port is lost when the app is updated with a new certificate. Using TrueNAS Scale 25.04.2.4.
The attached patch is a workaround that fetches the port number and applies it with the certificate. Seems to fix the problem.
Retain_web_port_number_when_updating_app_certificate.patch