Figured it out! If anyone has the same problem, here's the answer: there's a "Hide Magisk" option in settings. If you click on it, it renames Magisk Manager app to just "Manager". It also seems to prevent apps not installed through Magisk itself from requesting root since the root checker app I downloaded also didn't work. The fix: uninstall Magisk Manager and reflash the zip through TWRP. Then you should be all set, just don't hit that "hide Magisk" button in settings or you'll need to repeat the steps above.
Hide magisk option repacks the apk with random package name. As the resulting apk is modified version of the genuine manager apk, it requires signing. Manager does it automatically.
But it seems that your Manager version does not use the proper signature when doing it.
What I feel is that you are flashing, for example, a stable magisk release and then update it via manager app to beta or canary. All those variants use different signatures and switching between them should be always performed by full uninstall and flashing from the scratch.