Learn how to ski.... haha
But for real thats the best answer, if you can't stay in balance on the in run then you probably have some stance issues. Try to stay forward but balanced on the center of your skis. Think of your legs as shock absorbers, keep them too loose and you fall or knee yourself in the face, too tight and the shock will knock you into the back seat. Ski a lot of moguls to get the balance down. Getting damper skis will help too. Stiff doesn't always equal stable in crud, damp does.
Random tangent time because I'm really baked:
A lot of people overestimate how good they are at all mountain skiing (no offense and I'm not calling anyone in this thread out this is just something I've noticed) because they don't recognize good all mountain style. It's the difference between penciling a sketch 7 and floating a smooth corked 7 with a solid grab, both skiers can 7 but one is clearly better than the other. Most park skiers recognize the difference in the park, but assume they are solid all mountain skiers because they can skid down most runs. There's nothing wrong with that but a lot of park skiers don't realize how creative you can get with natural features and what they're missing because they don;t recognize good style and try to imitate it out of the park. There's nothing more fun then hauling ass holding an edge (try running a "straight" line through crud on edge without turning, it helps with stability on run ins) into a tracked out steep chute, popping of a natural lip over a small drop and landing on a narrow tranny off the back of a pile of crud or a mogul, turning out in complete control super fast, banging out a couple of quick turns between crud piles, then straight lining out to a big slash to switch ride out in a patch of untracked pow below. Super fun but it takes skills that too many people don't take the time to practice because they're only skiing from one hit to another and ignoring everything in between.