By Rabbi Raphael Fuchs
The reason it would be pronounced gashem is because it is the last word before a pause.
By Itamar Frankenthal