At a low level module replacement only happens when you refer to the module explicitly. For example, calling MyModule.do_the_thing vs. calling do_the_thing from within MyModule. The first will cause a lookup in the code server for the latest version of MyModule. The latter will not.
Further, BEAM only allows 2 versions of one module to co-exist. If one module update happens, but some processes never call the fully qualified name before yet another version is deployed, then those processes are killed. That’s what sounds like is happening to you.






















