Western militaries have things like this:
https://greydynamics.com/switchblade-drone-small-spring-load...More autonomy, but MUCH more expensive. Thousands or tens of thousands of dollars per use. The issue is indeed using mass-produced consumer drones. It's a bit like the widespread use of "technicals" in some conflicts: yes, a pickup truck with a .50cal in the back is inferior to tanks or armored cars, but it's also much, much cheaper.
There's a bit of a "Sherman vs. Tiger" thing that's been going on since the dawn of industrialised warfare. Is it better to have a more effective weapon that you can only afford a few of, or lots of cheaper ones?
The US doctrine approach to the problem would simply be a set of B2 bunker buster decapitation strikes on Russian military HQs, but of course that option is not available to Ukraine. They can't even manage Iraq-war-style wave of SEAD strikes followed by unit level CAS. The air war has kind of stalemated with neither side having conventional air superiority and both being vulnerable to the other's anti-air.