**Expected behavior**
It is expected that Bitcoin Core is not shutdown automatically during startup. Moreover, it should be possible to set transaction fee at 0.

**Actual behavior**
![Bitcoin Core Error mintxfee](https://user-images.githubusercontent.com/111286121/210274894-e91adf7f-43f7-4c3f-b799-222c00dc34a0.png)

**To reproduce**

1) Click bitcoin-qt.exe.

**System information**

1) A wallet that contained unspent funds was opened previously.
2) The bitcoin.conf file contains "mintxfee=0".
3) Bitcoin Core 24.0.1 official binary for Windows (portable).
if (IsAddressUsed(dest)) {
        return true;
    }
    if (IsLegacy()) {
        LegacyScriptPubKeyMan* spk_man = GetLegacyScriptPubKeyMan();
        assert(spk_man != nullptr);
        for (const auto& keyid  GetAffectedKeys(scriptPubKey, *spk_man)) {
            WitnessV0KeyHash wpkh_dest(keyid);
            if (IsAddressUsed(wpkh_dest)) {
                return true;
            }
            ScriptHash sh_wpkh_dest(GetScriptForDestination(wpkh_dest));
            if (IsAddressUsed(sh_wpkh_dest)) {
                return true;
            }
            PKHash pkh_dest(keyid);
            if (IsAddressUsed(pkh_dest)) {
                return true;
            }
        }
    }
    return false;
}
CWalletTx* CWalletAddToWallet(CTransactionRef tx, const TxState& state, const UpdateWalletTxFn& update_wtx, bool fFlushOnClose, bool rescanning_old_block)
{
    LOCK(cs_);
    WalletBatch batch(GetDatabase(), fFlushOnClose);
    uint256 hash = tx->GetHash();
    if (IsWalletFlagSet(WALLET_FLAG_AVOID_REUSE)) {
        // M