Be sure that is an open way to your base, even if you put it in an elevated spot be sure to build a stair long enough for the purgers to climb it. When the purge occurs let them come and destroy the lower part of your stairs: they won’t spam inside the base and always try the old path where the stair was.
Usually you only need to do this once, for the first purge, but to be sure rebuild the lower part of the stair and (eventually) crash it down when other purges occur.
It usually works for me, the frst purge 99% pf times spawns inside my base not being able to find a way to “walk it in”, so create a fake path, or a decoy (a useless tower near your base).
Hope it will work for you too
(unless they create flying monsters or spiders that can actually climb walls ^^)