I recently upgraded from an iPhone 12 to an iPhone 13 at an Apple Store.
Some apps migrated properly, some apps didn't.
I migrated the data with Migration Assistant while connected to the store's wifi for at least an hour as seen in this image.
After I wiped clean and returned the iPhone 12 (this was a trade-in situation, so I didn't take the iPhone 12 home), I noticed that the iPhone 13 did not carry a lot of app-specific data - both Apple apps that were supposedly iCloud backed (all my Safari tabs disappeared) and non-Apple apps (for example Polycam 3D LIDAR capture, which doesn't have an iCloud backup option in Settings).
If I decide to upgrade to an iPhone 14 in the future while trading in my 13, what can I do to make sure the migration of all my data happens without any data loss?