Same here, both on huawei p20lite (android 8 or 9) and a custom POE tablet 10" with android 6.0.1.
Teamviewer console shows devices online only if the app is opened and in foreground (i've already disabled battery optimization for all teamviewer apps); as soon as i move in background teamviewer host app and open any other sw (like file manager), the device goes offline in tw console.
With airdroid, same devices are always accessible (but with very limited feature)
Yes, Airdroid works fine (I have full version but limited features too) and it takes much memory (RAM) on pc.
Teamviewer is still having background issue on Samsung J5 2017, Samsung M20 2019. Working fine on Samsung A70 2019 and Samsung Galaxy Note 3 2015