What you could do is use a certificate which is already trusted by LXD and put that in ~/.config/lxc/client.crt and ~/.config/lxc/client.key on the systems you’re migrating, then lxd-p2c won’t be asking for a password at all.
This is odd, maybe I misread the code of lxd-p2c but this should have worked…
Can you run strace -o out -f lxd-p2c URL testvm /, let it fail in that same way and then do grep client out to see if it ever looks for that client certificate somewhere?
You can grab a new binary from the test results on that PR or wait tomorrow for someone to merge it and then grab the binary from the main Github Actions.