I believe you're referring to separating the nail from the nail bed, correct?
I've done that mildly on a couple of occasions, and it hurts. The only way I've found to avoid it is to:
1. Make sure I'm altering my fingering for bends. Rather than using my very finger tip I pull back slightly so I use a little bit more of the pad. That separation only happens when bending toward your face. When bending downward, it's more of a pulling motion so it's not an issue.
2. I use more than one finger for the bend. When bending I usually use my third finger, and I'll typically put down the first, second, and third, and bend with all three of them. That helps spread the pressure around so there's not so much pull on one finger. If I bend with my second finger, this is not that much of a problem because that finger is stronger.
3. Make sure my nails are cut very, very short most of the time. I started paying attention to my fingernails when I was 9 and playing the violin. These days you usually can't even see any white on my nails. I cut them last Wednesday and there is only now about 0.5mm of white on them. Almost time to cut them again. This helps in may ways when playing, from buzzing, to catching nails on the fingerboard, to pain when fretting notes, and so on.
I'm sure there are other tips, but probably best is to make sure your technique is perfect to prevent that pulling motion because it really, really hurts. I've been there.