How do I prevent apps from automatically closing during updates?
There is no way you could stop from an app from getting terminated when getting updated.

Because when app is getting updated the apk inside the /data/app/nameoftheapp/base.apk gets updated and a .dex file must be made of the new base.apk 

So the current process of the app is terminated and then daemon is invoked and it does it job of installing the app