A user reported to me that they are unable to create a PSBT with a legacy watchonly wallet when they use the GUI. They get an error "The amount exceeds your balance".

I think the issue is that the GUI will retrieve the wallet's balance via `AvailableCoins` before calling `CreateTransaction`. This call to `AvailableCoins` is resulting in fewer coins being returned with recent changes to how `AvailableCoins` works, particularly with additional filtering of spendable coins and preset coins.

***

Note that this does not effect descriptor wallets. A workaround for this issue is to switch to using descriptor wallets. An existing legacy wallet can be turned into a descriptor wallet using the `migratewallet` RPC. However many watchonly legacy wallets are likely the result of importing descriptors via `importmulti`. For such wallets, I recommend creating a new descriptor wallet and re-importing the descriptors.
assert(false);
    }
}
static util::Result<CreatedTransactionResult> CreateTransactionInternal(
        CWallet& wallet,
        const std::vector<CRecipient>& vecSend,
        int change_pos,
        const CCoinControl& coin_control,
        bool sign) EXCLUSIVE_LOCKS_REQUIRED(wallet.cs_wallet)
{
    AssertLockHeld(wallet.cs_wallet);
    
    int nChangePosInOut = change_pos;
    FastRandomContext rng_fast;
    CMutableTransaction txNew; 
    CoinSelectionParams coin_selection_params{rng_fast}; 
    coin_selection_params.m_avoid_partial_spends = coin_control.m_avoid_partial_spends;
    coin_selection_params.m_include_unsafe_inputs = coin_control.m_include_unsafe_inputs;
    
    coin_selection_params.m_long_term_feerate = wallet.m_consolidate_feerate;
    CAmount recipients_sum = 0;
    const OutputType change_type = wallet.TransactionChangeType(coin_control.m_change_type ? *coin_control.m_change_type : wallet.m_default_change_type, vecSend);
    ReserveDestination reservedest(&wallet, change_type);
    unsigned int outputs_to_subtract_fee_from = 0; 
    for (const auto& recipient : vecSend) {
        recipients_sum += recipient.nAmount;
        if (recipient.fSubtractFeeFromAmount) {
            outputs_to_subtract_fee_from++;
            coin_selection_params.m_subtract_fee_outputs = true;
        }