Okay, so I got the devices rooted on Lineage OS 17.1 successfully, on an already installed and used ROM. I found information kind of all over the place so I will put it all together here. Anyway after you have installed LOS:
1) Download the magisk app, it is an APK. I got the apk file from
Magisk itself HERE. You need to rename it to a .zip, then put the .zip on your device
2) Download the TWRP .img file. Place it in the same folder you'll be running commands from, or otherwise somewhere where it is easy to reference.I used twrp-3.5.1_10-0-ocean that I got
HERE
3) Hook up your phone. ADB debugging enabled. Boot into the bootloader using the command "adb reboot bootloader". Verify your device shows up with the command "adb devices"
4) We will boot into TWRP, not flash it. The command is "fastboot boot twrp-file-name.img"
5) Keep the system read only when it prompts you. Don't know if it matters, thats how I did it. Now flash the magisk zip from step 1, and reboot. Ta-da!
I haven't got an OTA yet, but when a new one comes out, I'll see if root remains after an update.
PS: It does not pass safetynet.
EDIT: Yes, root survives updates!