I don’t know why some dogs chose to growl and act assertive and some shiver and attempt to hide, but often the event just before these reactions is basically identical. Fear calls forth different reactions often from earliest times.
Can the reaction be modified? Usually, although the predisposition towards a certain set of reactions in a new situation tends to revert depending on the level of stress and the prior strength of the reaction. There’s a lot of muscle memory and automatic response going into surprise reactions. So to truly change it takes serious levels of practice especially during excitement and creation of new muscle memory. That is why early training is so important, it can stop the kind of reactions you don’t want to be entrenched and later training that uses games like tug (action/arousal) where fear and extraneous worries can be forgotten.
Another piece of the puzzle is the person/dog relationship. Often its actually the person who has the problem and the dog is just reacting to their tension.