I’m sorry that this happened.It sounds awful.
Unfortunately there are still many priests and,ironically,doctors too,who have stigma or ignorance towards Mental or Cognitive illnesses.
The priest probably felt that he was unequipped to provide advice to you regarding when your actions were due to sin vs due to the OCD.
Unlike with drug addiction,which he may view solely through the “sin model” so to speak, (as opposed to a medical model) explaining hy he was able to respond with kindness to your friend.
Iow,with your friend he perceives it as sin-ie: that your friend was changing after a lifetime of sin,but with you he perceives it as medical.
It’s very unfortunate that a person could be compassionate to one person but nit to the next,but often this is because they find a certain thing relatable to them.
People sometimes find it hard to put themselves in others shoes p if they haven’t experienced a similar situation or known anyone who has.
Try to keep in mind that different priests are different.
Different situation,but I remember a priest telling me a few years ago that priests are like any ‘profession’-some are worse and some are better.
Hopefully this isn’t the case overall(!) but it might be for your situation that you may find a more understanding one at a different parish.
Once you have found him,it’s good that you put trust in him regarding spiritual matters/whether your sins are forgiven and don’t doubt or double guess him etc…because,correct me if I’m wrong,but I think priests take on this responsibility with
God.
Ie:if they tell you something wrong it us between them and God now and God doesn’t hold you to accountability.
Perhaps you could pray to God if there was a way that He could use this situation for good.
Eg

erhaps through education at your parish or by you writing a blog or article on the matter etc?
Also,make a habit of not feeding your doubts!
Think of it like a little gremlin and every time when they want feeding ignore them and they will become less and less powerful.