For your specific question, you could do it exactly as you described.
When moving, disable solid, and when stopped, enable solids. In addition, whenever moving objects becomes solid, regenerate the pathfinding map and find a new path for everything still moving. This is probably going to cause new problems though...
There is unfortunately no easy answer to this, it's a pretty classic problem.
The first step solution is to ignore collisions and overlap between moving units until they reach their destination. This is usually sufficient to prevent pathfinding from becoming a detriment to your game. striketactics.net/tags/pathfinding
You can read about the history of pathfinding in popular games here, as well as their solutions and how they were done. sandruski.github.io/RTS-Group-Movement
Modern RTS's generally use flocking/swarming/steering movement algorithms in addition to pathfinding. gamedevelopment.tutsplus.com/series/understanding-steering-behaviors--gamedev-12732