What’s the firmware running ? Would you be able to run pyocd, using command similar to "No cores were discovered!" with nucleo_g071rb · Issue #743 · pyocd/pyOCD · GitHub ? The idea is to run only pyOCD, specify arguments - to use packs and proper target - making sure pyOCD is able to flash your binary.
To make sure, the packs are correct and also the target.