I'm pretty sure this wasn't explicitly explained in the film and I can't find any interviews where it is mentioned. However, Beck and everyone on his team are former employees of Stark Industries and were either forced out or left for various reasons. It makes sense that some of these people would have taken some stuff with them or at least the ideas and knowledge. One of them, William Ginter Riva, was specifically called out as having worked on/created the drones.
Mysterio: The integration of my illusion tech with your weaponized drones was brilliant. Powerful illusions, and your damage, worked like a charm. And this is just the beginning.
Spider-Man: Far From Home
This makes more sense when we realise that the B.A.R.F. technology is what Mysterio is utilising to create the illusions and so he must have taken it with him. Whether in knowledge form or something else. So we can easily translate his experience to William's and him taking the drones with him.