I am guessing from your prior posts that these are the big red ants as opposed to the tiny (Argentinian?) sugar ants that infest apartments in the Southwestern USA. I have dealt with the latter on a number of occasions. What I have found is that if you let them swarm in, and then kill every single one of them in a short period of time, they mark that space as dangerous and avoid it going forward. Worked for me in 2 separate apartments. Problem is the little buggers are tough to actually kill rather than merely stun. I found out that sweeping them into a dust pan using a whisk broom and then flushing them down the toilet does the trick, though. It's a lot of work, basically a little battle, but once that's done they don't come back. I felt cruel doing it, but I once found ants in my breakfast cereal, and that meant war. Ultimately it is less cruel because once you send the impression that there is an ant predator at that location, they avoid invading in the first place, which means I kill fewer that way than I would with poison.
IDK if that would work on the ants in your case, but I guess it couldn't hurt to do some online sleuthing to identify the species and find out best ways to eradicate that species. If you have the means a professional exterminator may be able to help. Sometimes I have dealt with exterminators who will only come in and do treatments, but some will also give advice on preventing re-infestation. Hope something in there helps.
Oh on the beetle - there is a specific species of beetle that impersonates the pheromones of ants so that it can enter the hive and then proceeds to feed on the ants inside. This might mean that ants and beetles may have a general prey/predator relationship, but really there are so very many different types of beetles that the mind boggles. According to the last time I checked, Beetles actually outweigh humans in total biomass on the planet. If you take into account food crops and animals, however, humans come out as the most resource-intensive on the planet. I don't know why I felt the need to share that, but one of my hobbies is packing in useless information so I hope it was interesting.