MIN_CHANGE is a privacy leak, since it is an easily observable wallet behaviour. Any output almost equal, but minimally larger than MIN_CHANGE is highly likely the change output of a tx.

Also, MIN_CHANGE is quite high, considering the value of bitcoin.

An easy fix for the second issue would be to just lower the value, but maybe some randomization can be done to also fix the first issue?
}
    
    
    auto& best_result = *std::min_element(results.begin(), results.end());
    return best_result;
}
std::optional<SelectionResult> SelectCoins(const CWallet& wallet, const std::vector<COutput>& vAvailableCoins, const CAmount& nTargetValue, const CCoinControl& coin_control, const CoinSelectionParams& coin_selection_params)
{
    std::vector<COutput> vCoins(vAvailableCoins);
    CAmount value_to_select = nTargetValue;
    OutputGroup preset_inputs(coin_selection_params);
    
    if (coin_control.HasSelected() && !coin_control.fAllowOtherInputs)
    {
        for (const COutput& out : vCoins) {
            if (!out.spendable) continue;
            /* Set ancestors and descendants to 0 as these don't matter for preset inputs as no actual selection is being done.
             * positive_only is set to false because we want to include all preset inputs, even if they are dust.
             */
            preset_inputs.Insert(out,  0,  0,  false);
        }
        SelectionResult result(nTargetValue);
        result.AddInput(preset_inputs);
        if (result.GetSelectedValue() < nTargetValue) return std::nullopt;
        return result;
    }
    
    std::set<COutPoint> preset_coins;
    std::vector<COutPoint> vPresetInputs;
    coin_control.ListSelected(vPresetInputs);