I'll take a stab in the dark regarding this lspatch issue.... some of the instructions on it that I've seen talk about how it creates a custom boot image, which is a commonality between it and what you need to do to gain root access.
At around Android 14, GrapheneOS made some changes to zygist that changed it with respect to upstream, so the magisk hooks would no longer work for it. Some forks of magisk accounted for these grapheneos changes, in particular, KitsuneMagisk. Its probably not appropriate for me to link to the changes here, but I have provided enough information for you to track the changes down if you're motivated.
I will also point out that browsing through the lspatch source code, it takes a LOT from magisk.