For the ones having this issue I had, I've found a solution. If magisk is having a package error, install magisk 22.1 from their website and install the apk. After that, return to the recovery menu and flash the magisk mod zip again. It works after that.I've successfully installed LineageOS and pbrp recovery (On SGP611) but installing Magisk doesn't work. I tried installing the Magisk mod from post #1 several times and I constantly have the same problem as MaX.
I also tried this, installing from the github but instead with Magisk 23, it didn't work. I either gets stuck on the Xperia logo on boot or it installs the app but inside the app it says that Magisk isn't installed.
I have installed it using this method, so the problem is not the way it is installed. I guess.
And I have not installed any Gapps, I don't know if that's a problem or not.
Any help on fixing this bug would be highly appreciated.
I was also wondering that only if Magisk really doesn't work, could SuperSU be used instead of Magisk? Especially since it has been discontinued quiet a while ago.