You’ll need to purge the packages and then make sure iptables-legacy is the default using the legacy commands here: nftables - Debian Wiki
Some commands will error as they aren’t used, like arptables
Once done, try installing the iptables-persistent package again