I had the same problem yesterday on MIUI.eu, Android 12.
I installed Kitsune Magisk (latest canary version).
I enabled Zygisk in the Kitsune settings.
Then i installed LSPosed version "LSPosed-npm-v1.9.2-7086-zygisk-release"
and then I installed the BootloaderSpoofer module into LSPosed, then I selected whatsapp in the BootloaderSpoofer and that was enough to start whatsapp on MIUI.
This same procedure didn't work on LineageOS and I still get the "non official whatsapp" error, but that's okay, I've definitely replaced whatsapp with Signal because i'm currently running LOS.