Unlocking Google Pixel 2 XL without losing data
Android devices always delete all user data when unlocking the bootloader.
This is a requirement by Google which has to be implemented by each and every device. In the past there were a few devices that did not perform a full wipe or had other bugs, but as far as I remember Google Nexus/Pixel devices were never affected by such problems.
Therefore I would not trust any software that claims to unlock the bootloader without data loss.
The way to go is to make a backup of all data, unlock the bootloader and then restore the backup. If an app does not allow to make a backup, sometimes the app itself has an integrated backup function to do so.