Also strengthen your mid/upper back and your glutes. They work with your abs to keep you upright.
Additionally, make your legs stronger so you can squat Down, instead of leaning forward.
Keep your chest up high, and your knees Out, so you can get down, “between” your legs.
Possibly Highly Controversial!
Try some squats with the bar held in your elbows, Zercher Style. With the bar held that way, leaning forward makes it really, really hard. Knees out, chest up, mid section tight all happens naturally, without having to think about what to do.