Hello Aryan,
I know you through Karman Drones. I am facing the same problem as you while following the secure boot document. I am following the same process, but I am unable to flash the bootloader.
Once the firmware becomes secure, I can’t connect to it through MAVProxy, Mission Planner, or QGC.
[ Reverting back from Secure Boot ] Link to your post.
Were you able to solve this problem?