[Google Pixel 2 Questions & Answers] armordillo:
Unfortunately, I can't describe a situation to get around this because the bootloader is still locked -- you'll probably want to unlock the bootloader and then leave it unlocked permanently if flashing the images using this method on a regular basis... I have personal notes that I've written for two scenarios. (1) is to gain root from stock and directions (2) is to flash the latest Android image and retain the data... Perhaps try the bottom block of steps (re-installing the factory image) --- but also unlock the bootloader from the top block of steps:

=======================

ROOT FROM STOCK

0.5 - Download the following
Magisk-v16.7-1674.zip -- https://transfer.sh/YVFdi/Magisk-v16.7-1674-.zip
twrp-pixel2-installer-walleye-3.2.3-0.zip -- https://dl.twrp.me/walleye/
twrp-3.2.3-0-walleye.img -- https://dl.twrp.me/walleye/
1.0 - On phone: Settings > System > About Phone > tap on the 'build number' seven times.
2.0 - The Developer Options will now be visible in the main settings page. Enter it and turn on USB debugging and OEM unlocking
3.0 - Reboot into 'bootloader' and unlock bootloader (this will factory reset phone)
# adb reboot bootloader
# fastboot oem unlock
4.0 - Download 'twrp-3.2.3-0-walleye.img' to Desktop. Rename the File to 'pixeltwrp.img' (Not necessary to rename -- just did; https://dl.twrp.me/walleye/)
5.0 - Now boot your phone in bootloader mode. Turn off phone and Hold the Volume Down + Power, then release Power button or...
# adb reboot bootloader
6.0 - Run the following command
# fastboot boot ~/Desktop/pixeltwrp.img
7.0 - Phone will boot in the TWRP mode. Push 'twrp-pixel2-installer-walleye-3.2.3-0.zip' and 'Magisk-v16.7-1674.zip' to the phone's /data/ directory
# adb push ~/Downloads/twrp-pixel2-installer-walleye-3.2.3-0.zip /data/
# adb push ~/Downloads/Magisk-v16.7-1674.zip /data/
8.0 - Tap on 'Install' and flash 'twrp-pixel2-installer-walleye-3.2.3-0.zip' and 'Magisk-v16.7-1674.zip' files
9.0 - Reboot Phone
10.0 - Install busybox on /system/bin

UPDATE IMAGE TO LATEST WITHOUT WIPING PHONE

0.5 - Download the following
Magisk-v16.7-1674.zip -- https://transfer.sh/YVFdi/Magisk-v16.7-1674-.zip
twrp-pixel2-installer-walleye-3.2.3-0.zip -- https://dl.twrp.me/walleye/
twrp-3.2.3-0-walleye.img -- https://dl.twrp.me/walleye/
1.0 - Remove "PIN UNLOCK" for security reasons
2.0 - Download the latest factory image from https://developers.google.com/android/images#walleye
3.0 - Unzip the factory image's ZIP and remove '-w' from "flash-all.sh"
4.0 - Reboot to bootloader
# adb reboot bootloader
5.0 - Flash image
# ./flash-all.sh
6.0 - Re-install magisk (https://dl.twrp.me/walleye/)
# adb reboot bootloader
# fastboot boot ~/Desktop/pixeltwrp.img
7.0 - Tap on 'Install' and flash 'twrp-pixel2-installer-walleye-3.2.3-0.zip' and 'Magisk-v16.7-1674.zip' files (located on /data/) - If installing a new magisk version, run the magisk uninstaller first '/data/Magisk-uninstaller-20180719.zip'
7.1 - Wipe Dalvik/Cache and reboot
7.2 - Install MagiskManager and TWRP Manager if not installed
7.3 - Go to bootloader and flash kernel 'flashkernel-wahoo-v3.01.zip'
8.0 - Reboot phone
9.0 - Install busybox on /system/bin
10.0 - Re-add security unlock

=======================

...If these options don't work then the last thing I can think is to attempt to boot into the 'pixeltwrp.img' and switch the the primary slot (from Slot B to Slot A) and try to reboot.