The flies will land in it and drown. Burying the food waste slightly below the surface of the bedding will help keep the flies from being attracted to the bin in the first place and it will slow down their reproductive rate if they do get in there. I avoid adding extremely acidic materials like rotten tomatoes to an indoor bin. It is a good idea to begin the process of decomposition of your food waste before adding it to the bin to make it easier for the worms to help break down. Food scrapes that are stored in a container should have air flowing into it but the vent holes need to be small like a window screen to keep unwanted pests out.
Some people avoid the problem by keeping their excess food scrapes in the refrigerator or freezer.
As the worms break down the bedding and it becomes more compact, it will reduce the volume of bedding in your bin. In a plastic bin, you may have to add dry bedding to absorb excess moisture. In a wooden bin, you may have to add water. Every 2-3 months move contents of the bin to one side, place fresh bedding and a handful of soil in the empty space and bury food there for a month or two. Harvest the other side after the worms have migrated to the new food and bedding.