The wallet does not mark the replaced tx as out-of-mempool. This causes failures in user scripts, because later RPCs may depend on this state change from bumpfee
.
For example, the following might fail on current master:
0txid = sendtoaddress(...)
1bumpfee(txid)
2abandontransaction(txid) # fails because txid is still marked as "in mempool"
Fixes #18831