Larian modded it a while ago. Your campaign settings is fully customisable to the point where you can set that no units can be produced.
Technically, I don't think that you can customize it so that NO units can be produced ever, but you can make them so costly that the match should be over before the first new unit comes off the line. For minimum unit construction in RTS mode, set the following:
Recruit Cost Multiplier: 3
Starting Recruits: 0
Recruit Rate Quantity: 1
With such a small recruit income, summoning the Dragon could take a long time, so optionally
Dragon Spawn Cost: 0
And adjust the length of the Dragon Timer and Dragon Respawn Timer to your liking (upwards is my suggestion to try and keep a token nod to balance).
These changes will have you get 1 Recruit every 5 seconds from each Recruitment Center.
A single Trooper will cost 9 Recruits to build, so it will take you 45 seconds to build a single trooper - and that is not counting the fact that you need to build a Battle Forge to make a Trooper, which is another 45 recruits (3 minutes and 45 seconds).
Freshly-built Recruitment Centers will cost you 60 recruits (5 minutes), although all 4-player maps will have a free second Recruitment center you can capture. With these settings, the starting units are all-important, but the Dragon will be a lot more powerful - maybe to the point where you want to disallow it from spawning entirely.
Personally, I like to simply set the following:
Recruit Cost Multiplier: 2
Starting Recruits: 70
Dragon Spawn Cost: 40
And that does a good enough job of reducing the numbers of units. Those starting Recruits give you just enough to build a Battle Forge (30) and Recruitment Center (40).