**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).
AssertLockHeld(cs_);
    if (auto* conf = wtx.state<TxStateConfirmed>()) {
        return GetLastBlockHeight() - conf->confirmed_block_height + 1;
    } else if (auto* conf = wtx.state<TxStateConflicted>()) {
        return -1 * (GetLastBlockHeight() - conf->conflicting_block_height + 1);
    } else {
        return 0;
    }
}
int CWalletGetTxBlocksToMaturity(const CWalletTx& wtx) const
{
    AssertLockHeld(cs_);
    if (!wtx.IsCoinBase()) {
        return 0;
    }
    int chain_depth = GetTxDepthInMainChain(wtx);
    assert(chain_depth >= 0); // coinbase tx should not be conflicted
    return stdmax(0, (COINBASE_MATURITY+1) - chain_depth);
}
bool CWalletIsTxImmatureCoinBase(const CWalletTx& wtx) const
{
    AssertLockHeld(cs_);
    // note GetBlocksToMaturity is 0 for non-coinbase tx
    return GetTxBlocksToMaturity(wtx) > 0;
}
bool CWalletIsCrypted() const
{
    return HasEncryptionKeys();
}
bool CWalletIsLocked() const