I sense a distinct lack of skill here. If you want your units to constantly move about, there is a PATROL ORDER. This prevents them from getting impaled quite reliably, unless they are stunned/blackholed or otherwise immobile. If you do not want your units to move out of the line when aggro'd by enemy stuff, you can put them on repeat move-command, which makes them move around without stopping for any reason. This keeps things like badgers, impalers and lances 100% immune to impalers.
There are a few units that have to stop in order to fire though, most notably emissary. Emissary dies HARD to impalers, as it can not realistically stop, fire, move away without intense micro. Also impaler outranges it pretty hard, making direct counter-battery work infeasible. Another easy target for impalers that could move away but does not are builders. Most builders can move and build, but will stop when close enough to their target. This makes them easy prey for impalers (assuming you have a spotter for vision). How big of a problem this is is a good question - most builders are quite poor targets for impalers in cost/hp sort of sense.
I see many ways to improve the survivability of conventional units vs impalers:
- get good at the game (see above point about patrol order)
- get cloak (deny targeting) - iris is way cheaper than impaler, and one iris covers a whole bunch of area.
- get owl (deny targeting) - also cheaper, but you may need 3-4 of them to get reliable jamming
- improve unit AI to allow units to automatically shift position every 3-4 seconds when otherwise idle. This would be super nice for things like envoys and sirens too, as keeping them on repeat has some negative side-effects.
Of these 4 ways, first 3 require no change to the game...