Uploading Firmware to BlackCube using Terminal

I am using WSL to build the arduplane code and upload it to the Pixhawk BlackCube. I have followed the procedure describe in here: Setting up the Build Environment on Windows10 using WSL1 or WSL2 — Dev documentation (ardupilot.org)

Then I compiled and build the code successfully. But when I trying to upload the firmware It gets stuck with message:
“Loaded firmware for 9,0, size: 1578388 bytes, waiting for the bootloader…
If the board does not respond within 1-2 seconds, unplug and re-plug the USB connector.”

I have already attached usb to wsl using usbipd. Now I am not understanding where the issue lies. I have checked with the hardware it works fine.

Any lead or suggestion will be much appreciated.

Initial Issue was I haven’t provided the USB reading and writing permission. I have given the permission using >> sudo chmod 777 /dev/ttyACM0 thsi command where ttyACM0 is my device name.
Now this works only 50% of time. When the pixhawk restarts for the bootloader the attachment and the permission is lost and the command fails to upload the firmware.

Any opinion or suggestion for me??