Variations of the stellar initial mass function in semi-analytical models – II. The impact of cosmic ray regulation. Issue 2 (5th January 2018)