how to switch sandbox account in iOS device

The app that you are trying to use is "licensed" to the account that purchased it, ie: the old account.

You will have to download that app again under the new account in order to properly use it.