Try reviewing the manual.
https://www.st.com/resource/en/user_manual/um1075-stlinkv2-incircuit-debuggerprogrammer-for-stm8-and-stm32-stmicroelectronics.pdf
>>Is there some configuration in the cubeide...
No, it's hardwired on the pin, and not gateable via the tools/drivers

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..