I suffered from so-called "yoga butt" a lot in the first five to eight years of practice; it would move from one side to the other.
Sometimes it's just time and patience, or it's just bad technique.
The Simple Rule Many Cues Get Wrong
Without getting too anatomical (I think it's rarely helpful to speak in anatomical terms, unless you want to write a dissertation instead of actually practicing and feeling it):
The basic rule to understand is that your quadriceps is the antagonist of your hamstrings. And if you are always told to bend your legs to ease getting in and out of postures or to ease pain, you might not be getting anywhere. The quads need to fully engage and fully push back to fully release your hamstrings.
What Finally Worked
What finally, fully cured my hamstring attachment aggravation was NOT bending the legs, but always working on locking the knees, fully engaging the thighs, always working on straight legs, while subtly weighting down my sit bones.
Another overlooked thing is that in Ashtanga Yoga, a forward fold is directed from sucked-in abdominals, the folds are strength based and are led from active engagement of bandhas, legs, feet and back muscles (without tensing too much).
So you might be in a position where you have no choice but to bend the legs along the way, but for me, the full push back of the quads relaxes the attachments. Think of softening the skin around your sacrum and groins. It's something you have to feel, not theorize.
It's All Connected
A lot of people lack the ability to tilt the pelvis forward enough. But you have to think of it as all connected; it's not one part you are working on, it's all parts. I see very often either or compromises between either long spine or straight legs. Rather think of elongating in both direction and your pelvis is what gives direction.
Generally think of moving from your breath, pelvic floor, and skin, while leg direction comes from positioning and engagement your feet, pushing into the big toe.