This is a question that can only be answered at length, but I will try to be very short.
Discrimination does not always equal persecution; however, it can. Persecution must reach a certain degree of severity, so if it is not severe enough, we define it as a severe violation of basic human rights. I think it's the same in the UNHCR guidelines. We have the same approach as the UNHCR on the issue of discrimination as persecution or not.
I hope this replies to your question.