With several Swarm managers, Portainer can start on another node and look like a fresh install. A placement constraint stops that.
docker node ls
docker service update --constraint-add 'node.hostname==manager1' portainer_portainer
The data volume lives on one node. When the service is rescheduled to a manager without it, Portainer starts empty and asks for a new admin. The documentation suggests a constraint on node.hostname with the name of the node that has the data.
The service is called portainer_portainer if you deployed the recommended stack under the name portainer. You can also set it in the stack file under deploy.placement.constraints.
Further reading: Portainer docs: How can I ensure Portainer's configuration is retained?