Magisk Module that allows you to run "adb root". Android 10 only. Probably will work with Android 9. Definitely not with Android 11/12.
evdenis/adb_root has 499 GitHub stars.
It currently ranks #20270 daily, #21035 weekly, #23638 monthly by momentum on Trending Repos; its best-ever rank is #5307.