performance problem with number of enemies in 2D

I don’t have much ressource to give you but you should look for thread like this one: How can I make AI have less impact on performance? - #16 by Anonymous_e5d5c0bf7d300728867097ff79906dbe

basically from what you describe the issue might come from the AI pathfinding, the character movement, the crowd avoidance system, overlap checks, possibly also dynamic navmesh generation, things like that that you should keep really basic or disable if possible.