From my own tests restoring a TWRP backup is working only with this two-step procedure:
- Restore the backup
- Flash the Lineage image
Otherwise if you only do the first step it doesn’t boot
I did a dirty upgrade from 17.1 to 18.1 with TWRP and it was successful
Later I did (two times) an OTA update of 18.1 with TWRP and it failed (the two times!)
After a restore (see above), the same OTA update but with LOS-recovery worked.
In any cases a backup is highly recommended