I use a little plastic Dixie cup thing like one you would use for a dipping sauce. I coat the inside of the cup with a calcium powder so they cannot climb out. This works better with Drosophila hydei then it does Drosophila melanogaster. Depending on the age of the chameleon whether that’s a neonite or a hatchling supplementation should not be used daily, thus this method can not be used every feed. If you have many babies and they’re in a bin I also know of some old school keepers who would smear a very thin layer of Vaseline along the top of the baby bin. Not sure if this is a practical or problematic method or if it is even still used. Either way you’re going to have escapees, there’s no true fail proof method when dealing with fruit flies.