Ants usually aren’t a problem for honeybees, unless the hive is situated right on top of an ant pile. Ants are a very minor bee pest. They are opportunistic and will consume honey left behind in an empty colony.
The ants pictured moved into a hive after the bees died. They were picking up a residue of honey left in the box.
If ants move into your hive after bees are gone, shake/scrape/dump/scatter move the ants out of the box. No harm done.