https://forum.xda-developers.com/pixel-4-xl/how-to/guide-update-retain-root-t4003839/page11
1. Download full factory image (in my case qq1b.200105.004)
2. Extract zip
3. Extract the stock boot.img from the other zip (in my case image-coral-qq1b.200105.004.zip)
4. Place stock boot.img in phone storage
5. Using Magisk, patch the stock boot.img via "Select and Patch a File"
6. Rename magisk_patched.img to boot.img and drop it in the image zip, replacing the stock boot.img (in my case image-coral-qq1b.200105.004.zip)
7. Remove the -w from the flash-all script
8. Optional* Disable Magisk Modules
9. Reboot to bootloader
10. Run flash-all script
11. Reboot
by eg1122
更新KEEP ROOT 用住呢個先