Neutral units/buildings remaining on map after defeat

I am currently looking to optimize a few areas/issues in Forest Nothing. When players are defeated/surrender during FN games, all of their units remain on the map, and this can lead to massive drops in performance(i.e. many idle woodcutters, traders). This issue is compounded when one cannot build over idle units without destroying first, and idle units blocking paths through the trees.

Is there any way these units can be removed from map on player elimination, either through the editor, or lua commands?

Thanks!