Why in the world drones with MGs and rifles are not more widely in use is beyond me.
It could be a number of things, probably in combination. I'll list some things as I think of them, you figure out which ones might apply, and how much...
Rifles require precision to hit. Machine guns require area saturation to be effective. Both require a (relatively) stable gun platform. And in the case of machine guns they need time on target (firing time). Aircraft, piloted or not, are difficult platforms to achieve this with. Not impossible, just difficult. Today we "easily" (read expensively) over come this with guided missiles and stabilized tracking systems that stay on target no matter what the launch vehicle does.
Range: Rifle caliber machine guns are effective to about 1km. .50cal guns can double this. Guided missiles have ranges measured in miles, often several miles.
There's a big difference between delivering several hundred or thousand(?) machine gun bullets from a distance where its possible to SEE the attacking aircraft and delivering a couple dozen pounds of high explosive from an aircraft out of visual range from the target location.
heavy machineguns, and the ammo weigh a lot. And while the ammo weight goes away when expended, the weight of the guns and mounts is a constant. SO, the aircraft has to be built to handle the weight, and the recoil. Missiles, on the other hand are rockets, essentially recoilless, and the weight penalty only applies until they are fired.
Based on what I've seen, and what I know (though by no means an expert) drones are built as "lightly" as possible to perform their mission. This has always been true of all aircraft, of course, but drones take advantage of a host of things in their strength requirements that manned aircraft cannot.
Example: aircraft have to be strong enough to survive air to air combat loads (especially fighters), drones only have to be built strong enough to carry their intended load, and fly.
And, while missiles are much more expensive than machineguns, #1 they deliver orders of magnitude more "bang" per shot. And while they are not reusable, they have the range to reduce the odds of the drone even being spotted, let alone shot down.
Missiles also offer a versatility that guns cannot. A missile could be solid shot (though that's more than a bit of a waste of money) to a warhead that can take out a bunker or a tank. Literally, a missile can range from "dropping a grenade" to "dropping a nuke" in power, depending on what warhead the EO techs bolt on the missile body.
I'm sure there's a number of important things I haven't thought of, again, no expert, but my point is that drones firing missiles offer a wide range of capabilities and advantages that drones firing machineguns do not.
Although, now I am curious about a drone built with the ruggedness and armament of a P-47 Thunderbolt......and modern engines allowing a good amount of "hang time..." Be WAAAY cool if it looked like the P-47, too..