The solution is separation of powers. Let the amount of the UBI be determined by an independent institution (like a judicial body) based on predefined criteria, put that mechanism into the constitution, and obviously have any kind of corruption or bribery be a criminal offense. It’s certainly not a 100% foolproof, but would go a long way.