nRFCloud CoAP timeout

Hello,
I am working on a device based on nRF9160, SDK 2.8.0 and modem 1.3.7.
The devices uses nRFCloud CoAP to send messages. For the most part, it's working great. However, I am currently trying to fix an issue that occurs from time to time, hence ipossible to reproduce.
For example, I have a device on my desk, urban area with  good network coverage. I am getting this issue about 20~30% of the time. Eventhough I am using the same firmware, the same SIM, the same MCC-MNC, ...
On many device, the first call to nrf_cloud_coap_connect() after a reboot will fail, returning -5.
After digging a bit, the error comes from :
nrf_cloud_coap_connect() -> update_configured_info_sections() -> nrf_cloud_coap_shadow_state_update(), that return -116 (ETIMEDOUT / Connection timeout)
I tried changing the KCONFIG setting CONFIG_COAP_INIT_ACK_TIMEOUT_MS to a higher value (default being 2000), but it doesn't seem to make any difference. To be honest, it seems to be even worst.
I set it to the maximum value of 100000ms, and was very surprised to see that ETIMEDOUT was returned only a few seconds after calling nrf_cloud_coap_connect(). It's like this parameter has no impact ...
I tried to find any reference to timeout in the nrf_cloud_coap_ functions, but didn't succeeded. The only thing that looks like it is a #define NON_RESP_WAIT_S 3 in nrf_cloud_coap_transport.c
Could you please guide me on how to fix this issue.
Related