can you force the boot0 to boot to the main flash for you board a with a jumper and see if you can connect. you can find some information about STM32 boot here: FAQ STM32 boot process - STMicroelectronics Community
Normally, you need to use this function to check the connection type, including security and encryption, before proceeding with the connection. Therefore, you should use this function during the search phase