I have top feeders for some of my hives, but I only use them in early spring before the nectar flow or in late fall after the nectar flow. Robbing around where my hives are seems to be low at those times. During the nectar dearth when the risk of robbing is high I use gallon sized freezer bags that go on the top bars at the top of the hive. I’ve made spacers that are 1 1/2 or 2 inches high so there’s room for the bees to get at the food. You can also use an empty hive body to give them room.
Here’s a little video I did showing how the baggie goes on the hive. Some folks make an X instead of a slit and do it near the top of the bag so they can just refill bags each time. I’ve refilled bags doing it the way I do it as well, but this example doesn’t show that.