Maintaining idle production capacity is expensive. Really expensive, for such specialized tooling. And war has changed a lot since 1918, artillery is no longer a lone fighting force like it once was. Countries have chosen to tool for different types of armament in a lot broader strokes.
I’m sure, if the need arose, plants could retool a lot faster than you realize.