Now, that triggers a note:
Portainer has a tendency to hold on to environment values from previous containers even on container restart.
In the past, this has ocassionally stopped unlucky users from starting their Pi-hole container in Portainer after image upgrades, see e.g. Pihole Portainer/Docker 5.8.1 startup error?.
Would you also have been upgrading your Pi-hole to a new image, or was this a fresh installation?
Anyway, glad it's working for you now.