are you right handed or left handed?
I will assume for a moment that you are right handed, since a majority are.
Maybe you are too upright in your leg lift and it feels like you are locking out your right knee.
It seems like I’ve been suggesting a lot of wall drill lately, but perhaps that will help you.
Also, try keeping your weight over the inside of your right foot as you start your leg lift, as that may help you keep some flex in that leg.
Hard to really help without seeing it–or knowing if you are RH or LH.