Thank you and the rest of you for your responses.I don't see a reason why that would be related to magisk in any way. But anyway I am using stable version of magisk in combination with EdXposed build 4661 and riru 23.1 on my op7pro and everything is fine. Maybe check if you didn't forget to enable master switch for navbar tweaks. This is necessary for full navigation key actions compatibility.
Yes, I did enable the master switch.
And the only thing different between the two cases is the version of Magisk. Everything else is exactly the same. The navbar buttons are remappable for me under Magisk 20.4 but not under Magisk 21.2. Magisk version 20.4 is the stable version, and it also works for me. As I mentioned, the only time the problem occurs is when I am using the beta version of Magisk, i.e., 21.2.
I don't have time at the moment to reinstall 21.2 and collect logs, etc., and I just asked here about this now, in case anyone might have seen this before and might have a quick suggestion for a fix. Later when I have more time (possibly as late as this coming weekend), I'll try again and do more extensive debugging involving log files.