I want to disable other communication protocols if one communication protocol is active. For example, if my board is connected via serial communication, it must not connect via Bluetooth or any other communication protocol.
Other than setting ports you don’t want to support MAVLink to None and having exactly one configured MAVLink port there are none.
If attacker has physical access to your device it already is over, and for all practical purposes being in Bluetooth range constitutes physical access.