Before you update the secondary node, if you haven't already, please move /etc/pihole/setupVars.conf
somewhere else. If it exists then then now-fixed migration code will pick it up and pull in your v5 settings.
I'm truly sorry you got caught by this, rest assured I'm not sleeping very well currently!!