You can preserve shaft distance with different modules by adjusting the number of teeth.
pitch diameter is N x M, so PD =36 x .5 = 18
some modules that will have PDs of 18 with an even number of teeth are
PD = 45 x .4 = 18 PD = 90 x .4 = 36
PD = 36 x .5 = 18...