Android - Why apps move from SD card to phone memory after upgrade and how to avoid it?

It is an existing behavior found in Lollipop. (May be an marketing strategy to make you buy expensive internal storage phones)

According to Lollipop the phone internal storage is referred as SDCard and removable SDCard as EXTERNALSD.

The apps is designed to be reside in SDCard (to support phone without external storage ) and hence the apps are installed back to internal storage.

This is fixed in Marshmallow were the EXTERNALSD can be configured to be an InternalStorage(SDCard).

So you can wait for an Marshmallow update for the device.