When connecting an Xbox controller to a mobile device to play Minecraft with it, when the RT or LT buttons on the controller are pressed, it causes the in-game camera to spin around uncontrollably even when no buttons are being pressed on the controller. In fact, the LT and RT buttons do not do their assigned function at all when pressed. Even when disconnecting the controller from the device and using touch controls, the camera still spins uncontrollably. The only way to fix this issue is to restart Minecraft entirely. I also tried using this controller on the Windows 10 edition of Minecraft and the LT and RT buttons work without any issues. I also tried an old Logitech controller on both the mobile and Windows 10 versions of Minecraft and strangely, it works with no issues on both versions.
The mobile device I used was a Samsung Galaxy S9+ running Android v9. The controller I used was a third-party Xbox controller connected to the mobile device using Samsungs USB-A to USB-C adapter.