How to output from transmitter and arduino uno to pixhawk at the same time

Hello, I have built a drone for the first time. The components used are as follows:
Controller: TX16s
Flight Controller: Pixhawk
Receiver: R81

My query relates to connecting an Arduino Uno to Telem2, and using the TF Mini-S sensor attached to the Arduino Uno for obstacle avoidance. I have managed to vary the throttle output from the Arduino to the Pixhawk according to the distance measured by the sensor. However, I’ve encountered a problem. When the Arduino is performing collision avoidance using the sensor, it does not respond to inputs from the TX16s controller at all. How can I make it possible to accept simultaneous inputs?