Fruit flies benefit from the odor of beer and wine, so try out leaving out an old alcohol bottle that also consists of a bit of wine or beer inside of. Use a residual insecticide to spray surfaces in which fruit flies wish to land. In advance of use, read https://howtogetridof.it.com/pest-control/how-to-get-rid-of-fruit-flies/