Were you ever able to solve this issue? Running into the same problem myself where it works with the st-link but not with the raspi.
I have gone through and confirmed through measuring voltage and also using led's that the raspit is sending a signal through the swclk and swdio pins but that the stm32 is not sending a message back.