Since the new phone is signed into the new Apple ID when you delete the photos from the old account on it, it will only delete them on the new ID and on anything signed in with that new ID. Since the old phone is still using the old ID, once you sign in on the new phone with the new ID the two devices are no longer connected.
Let's say you have both phones signed into ID#1. You then sign into phone#2 with ID#2. You could have a photo from the ID #1 that you choose to have remain on phone #2 when you sign in with ID# 2 on phone #2. Since iPhone #1 is signed in with ID #1 and iPhone #2 is now signed in with ID #2, the two are not connected. If you delete a photo on phone #2 left over from when it was signed into ID#2, it will only be deleted from ID#2. Since iPhone #1 is using ID#1, the photo will remain on that phone.