Just reinstall the OS instead of restoring it with TWRP.
I never successfully restored either Fairphone OS or /e/OS with TWRP when I tried initially, always got a bootloop. Only restoring the data partition with TWRP worked, which is good enough for me.
https://support.fairphone.com/hc/en-us/articles/360048050332