It may help to zapwallettxes your wallet............
The
zapwallettxes option doesn't work anymore. It was removed in the version 0.21.0.
The -zapwallettxes startup option has been removed and its functionality removed from the wallet.
I didn't understand why you recommended using
zapwallettxes, but if the purpose is to removing an unconfirmed transaction, should run the wallet without any startup option and use abandontransaction command instead.