STM32F103C8T6 E Scooter sets Lockbits by itself, patch .hex

Hello folks,

I am actually try to reverse a Ninebot G30, but i am not very lucky with it, and theres some sort of strange behavior the ESC of the scooter shows: The firmware sets the read out protection by itself. I tried to disable that to set command to jump over the instruction, but this does not work. I have readed that:

And found the adresses for the lockbits in my firmware, but every attempt to change the program so it will jump over the instruction does not work. Is there a way to patch a binary directly in IDA?

Here I have a screenshot from IDA, I think the rad framed function part sets the lockbits.