In most seated hamstring stretches you tilt you pelvis forwards relative to your thigh (or attempted to).
In modified heron pose (or "compass prep") you use your arms to pull your leg towards you. You could think of your arms, in this case, as substituting for your hip flexors.
So instead of using your hip flexors to pull your leg towards the front of your body, you can use your arms (either retracting your shoulder blades, or bending your elbows, or using both actions.)
If you can't comfortably straighten your leg in this seated hamstring stretch, use a strap.
As you loosen up, you can then ditch the strap and hold on to your foot with your hands.
The instructions below can apply equally well to using a strap or not using one.
To start off with, practice sitting up tall while holding your foot. Keep your shoulders relaxed.
Repeat these actions a few times.
Then add your leg. As you lengthen your spine lengthen your leg as well.
Rather than trying to straighten your knee you can focus on pushing your foot into your hands. Your knee will straighten as a result. Relax both your leg and your spine as you exhale.
Initially, each time you exhale re-bend your knee. Then straighten it as you inhale. Do both actions slowly and smoothly, in time with your breath.
As you get more comfortable with the straight leg position you can keep your leg straight as you exhale. Just focus on making it and your spine feel long as you inhale (Press your foot into your hands.) Then relax the length as you exhale.
Initially, focus on keeping your shoulders relaxed as you straighten your leg in this seated hamstring stretch. Imagine that you are using your leg to stretch your shoulders. This is to avoid compressing your hip joint with your arms. You may also find that it makes it easier to straighten your leg.
Once you get your knee straight you can bend your elbows and pull your leg towards your torso. Keep both your leg and your spine feeling long as you do so. Relax arms and spine while exhaling.
Once you can straighten your leg while keeping your shoulders relaxed, you can try pulling your leg into the hip socket with your arms. But resist with your hip joint muscles. As you arms work to compress your hip joint, use your hip muscles to resist the compression.
In both cases (hip joint and shoulders) increase the pressure or tension gradually. And release it gradually as well.
One of the reasons for keeping the spine straight is because this is a seated hamstring stretch. With the spine straight the hamstrings have an anchor from which they can lengthen from. That anchor is the bottom of the pelvis which is held in place by your straight spine.
With the pelvis anchored, then straightening the leg and pulling it back stretches the hamstring of that leg.
In addition, your straight, and strong, spine gives your arms a firm foundation from which to work on your leg. So the basic idea here is to provide a foundation, your spine, so that your arms can act with strength and so that your hamstrings can stretch.
As a yoga teacher, I'm constantly exploring new exercises, new ways of doing yoga poses.
There is no single "right way" of doing a yoga pose. Instead, there are options. And the better you are at "feeling" your body, the better you can get at choosing the right option for your body as it is now.
For any technique, the point of practice is to learn feel it and to control it, so that it can be used without thinking about how to use it.
And that is more or less the approach taken in all of my ebooks and videos. They help you to feel your body and control it so that you can work towards using it effectively in anything that you do.