Please read this, thinking that there may be such a possibility.
I fork each version of Bitcoin to make Fujicoin. I am currently testing Fujicoin made from v22.0rc2.
https://github.com/fujicoin/fujicoin

I often create large transactions with more than 350 inputs, but in v22.0, I fail to transfer money due to lack of fee about once every few times and get into a "not in memory pool" state.
This phenomenon sometimes occurred in previous versions. It rarely occurred in v0.21.x, but it seems that the frequency increased in v22.0.

Specific explanation
--------------------

The following image is the dialog at the time of remittance.
![fujicoin5](https://user-images.githubusercontent.com/7656623/128798045-08037fc5-d4ea-4dd2-9a5d-813cbd33c14a.png)

The following images show the remittance result and its details.
![fujicoin6](https://user-images.githubusercontent.com/7656623/128798270-287f9586-4a31-449d-9e69-853a6a5c3b4b.png)

![fujicoin7](https://user-images.githubusercontent.com/7656623/128798285-dc45a05e-0d71-488a-8e03-a46d30de7bdc.png)

I made a program with python and calculated fee from raw Tx. In my calculation the fee was 2.57729334.
Therefore, it is correct to be out of memoly pool due to insufficient remittance fee.
In this case, the pre-remittance fee calculation is incorrect.

As you can see from the figure, this phenomenon can be reproduced many times if the wallet state is the same.
Unfortunately, I don't have any more parsing ability, so I can't identify what kind of transaction causes a calculation error.

Fortunately, I've never experienced this with regular size transactions. Transactions that could not be remitted can be canceled, so there is no actual harm. 

I think it's pretty difficult to identify this problem, but I think it's very good if it improves.

#include <wallet/coinselection.h>
#include <policy/feerate.h>
#include <util/system.h>
#include <util/moneystr.h>
#include <optional>
struct {
    bool operator()(const OutputGroup& a, const OutputGroup& b) const
    {
        return a.GetSelectionAmount() > b.GetSelectionAmount();
    }
} descending;
/*
 * This is the Branch and Bound Coin Selection algorithm designed by Murch. It searches for an input
 * set that can pay for the spending target and does not exceed the spending target by more than the
 * cost of creating and spending a change output. The algorithm uses a depth-first search on a binary
 * tree. In the binary tree, each node corresponds to the inclusion or the omission of a UTXO. UTXOs
 * are sorted by their effective values and the trees is explored deterministically per the inclusion
 * branch first. At each node, the algorithm checks whether the selection is within the target range.
 * While the selection has not reached the target range, more UTXOs are included. When a selection's
 * value exceeds the target range, the complete subtree deriving from this selection can be omitted.
 * At that point, the last included UTXO is deselected and the corresponding omission branch explored
 * instead. The search ends after the complete tree has been searched or after a limited number of tries.
 *