I am unable to change modbus pins on the nRF 5340 dev kit. The default is pins 1.00 and 1.01 which work fine with the example and also with further development. But when you set CONFIG_BLE the network core takes over that UART.
This is what the existing overlay has: