This is more a mindset thing than a technical skills thing.
Learn to love the dirt and the muck. Think about how much it is bothering your competition when they are sitting on your wheel. You have to love riding in the horseshit and just breathe it all in
This is a switch that flips semi randomly for me - I have rainy races where I am dialed in and race very well and I have rainy races where I check out and tail gun and do nothing at all. Sometimes I love the grit and the grime and the cornering - sometimes it just isn’t worth it to me