RAK3172 Stalling at MX_LoRaWAN_Init()?

Hello,
I created a custom board with the RAK3172. I am not using the UART, but rather STM32CubeIDE to program and STM32CubeProgrammer to flash the board. Anything unrelated to LoRaWAN works perfectly. I can blink LEDs and obtain values from sensors that are attached to the board. However, each time I try to run MX_LoRaWAN_Init(); it stalls. RAK3172 Low-Level Development | STM32WL LoRaWAN SoC Firmware Guide I’m following this guide.

So far, I’ve tried to narrow down the problem. I was originally experimenting with my own firmware when a chain of the following functions didn’t work properly (as in they didn’t return:)
MX_LoRaWAN_Init()
→ LoRaWAN_Init()
→ smtc_modem_init()
→ ral_init()
→ ral_sx126x_init()
→ sx126x_init().
All of the functions return normal values. When inspecting line by line, I don’t find any errors. However, when using the vendor provided example it doesn’t work at this specific line.

    mibReq.Type = MIB_PUBLIC_NETWORK;
    mibReq.Param.EnablePublicNetwork = LORAWAN_PUBLIC_NETWORK;
    LoRaMacMibSetRequestConfirm( &mibReq );

does not return properly. I find that LORAMAC_STATUS_NVM_DATA_INCONSISTENT is the value of LoRaMacMibSetRequestConfirm( &mibReq ).
This code is located in lmhandler.c after following the guide. Do you all have any ideas as to how I could fix this? The initial values seem correct but they end up changing with functions relating to NVM.

Thank you all for your help!