thanks for the reply. seems like at least in 9.0.0 they have removed that, you can check via xref or googlesource
anyway, throughout my time using android, oem and custom, I've never seen a /root before. it's not a symlink either and is an empty directory. I've been using Nokia phones (Nokia 5 2017, Nougat->Oreo->Pie) which is very close to AOSP. The same app never fails and on closer inspection /root has never been there. Even with installing su binary, it only copies su and supersu/superuser.apk including some tweaks in the script but never create a directory called /root
the usage of keyword root in root detection probably hinted towards the early android days (2.2+) although if I recall no /root was created or existed in other oem android. still, it triggers root detection app, most likely since it has been used in the past. I'd suggest if you're compiling a new build, tweak the mk file to exclude root as I've digging init.environ.rc but doesn't find the reference towards that command line
if you have a way to remove /root in a persistent manner please let me know.