How can I get the maximum transmit (TX) gain for a specific region using the BL5340PA?

You will need to specify the antenna type and region in your board file or project configuration file. Based on those parameters, the FW will set the maximum allowable TX power for each channel and modulation.

 The default for the BL5340PA DVK is North America (FCC/IC), using an external antenna.

 Refer to the BL5340PA_manifest link below for details:

 LairdCP/bl5340pa_manifest: Manifest for the Ezurio (formerly Laird Connectivity) fork of the nRF Connect SDK with support for the BL5340PA (