Your body will not allow you into a position it doesn’t feel safe. This means two things.
#1. Get stronger.
#2. Improve your mobility.
If you struggle to hold good posture while running or lifting your body is lacking strength, and as a result accommodating movement. Our bodies don’t look at a deadlift and say, “hold a neutral spine, flex the knees, hips, and ankles”. It says, “hey! Pick that up!” And it does it by any means necessary. Strength is crucial to efficient, quick, injury resilient movement.
Second, our bodies accommodate movement that doesn’t feel safe. If your hamstrings are tight, your quads and hip flexors will not be allowed to overcome the ‘fear’ in the opposing muscles. The body must be retaught this range of motion is safe. Corrective exercises like straight legs are money for that!