How should I backup apps that I downloaded from one Apple ID to another Apple ID on the same iPhone?

How should I backup apps that I downloaded from one Apple ID to another Apple ID on the same iPhone

I dowloaded whatsapp from an Apple ID . And now I've made a new Apple ID and want to backup my messages and media in this new Apple ID .
Is there a way that the messages along with the media get backed up on this new Apple ID and not the old one.
Note: I do not want my messages to be backed up in the first Apple ID at any cost because I suspect my password has been stolen and changed
First, if you thought a password may have been compromised the right thing to do would have been to change the password, not make a new AppleID... You really should as that is the only way you're going to fix apps... Using FamilyShare between the two AppleIDs.

Original thread: https://forums.imore.com/threads/how-should-i-backup-apps-that-i-downloaded-from-one-apple-id-to-another-apple-id-on-the-same-iphone.324707/