This PR proposes a solution for #26500 by changing the AvailableCoins() function to calculate values by status (TRUSTED, UNTRUSTED_PENDING and IMMATURE) and ownership (MINE, WATCH_ONLY), eliminating the GetBalance() logic.
The downside is that the cache is no longer used. Not sure about the performance implication, but if the approach is OK, caching can also be used with this solution.
This approach also fixes the bug mentioned at the end of the wallet_abandonconflict.py file.