Descriptor wallets don't support dumpwallet, so make the tests that do
dumpwallet legacy wallet only.
This is a backport of core#19077 [22/26]
https://github.com/bitcoin/bitcoin/pull/19077/commits/310b0fde04639b7446efd5c1d2701caa4b991b86
Depends on D10576