This happens to me with a Moto G55, an Honor tablet, and an Honor Magic OS 8.0 smartphone. I select the developer options to allow data transfer mode when connecting the cable. But then it resets the settings. I also notice that it asks me to enter my fingerprint to enable data transfer mode...