Yes. The Agent stores state (including the certificate pin) so it survives restarts and updates.
If your TrueNAS uses a self-signed certificate, the Agent can pin the certificate fingerprint (TOFU). This avoids insecure “accept any certificate” behavior.
Only if the TrueNAS certificate was changed intentionally or you switched the TrueNAS system/host.
NAS Guard is designed around a configured server profile. If you change the server profile, make sure the Agent connects to the intended TrueNAS system and reset the pin if required.