You can either hold the food under water for a few secs until they water log so they sink, or presoak them in a container outside the tank then slowly lower it down into the tank.
Sinking foods should sink regardless, floating foods would sink if water logged. Repashy and algae wafers should sink.
Do you have a airstone running and the bubbles are sucking/lifting the food up to the surface?
Vegetables do float, so they need to be weighted down. I also use a suction cup with a chip clip attached to the end and clamp the vegetable close to the substrate (or higher up for swimming fish)