Unable to program LoRa-Wio-E5 using the on-board st-link v2 debugger in STM32 NUCLEO-446RE

I am using my STM32 Nucleo-F446RE’s onboard stlink v2 debugger to flash LoRa hex file generated into Seeed studio’s lora-wio-e5 after building the LoRa project package for STM32WLEJ5 and I have removed CN2 jumpers and connected the the corresponding SWD pins of debugger to my wio-e5 board’s CN4 connector with VDD of debugger connected to 3.3V of wio-e5.
Connections are as provided in the picture in the below link:

The data read was successful in cubeprogrammer but when I generated the lora_end_node hex file using the STM32WLE package and tried to program it into my wio-e5 it says failed to erase memory and won’t program it.

Please help me with this.