Biggest thing I find, and I'm a massage therapist so 90% of what I talk about it posture, is find the little things that throw you out of whack.
Computer chairs are demons that clench your hips and back, fuck your abs, push on your elbows and shove your shoulders into your ears while you slouch forward and ruin your neck.
Standing desks are only as great as you are willing to move. Standing there, especially in bad shoes on hard floors, is almost as bad as sitting.
How you sleep effects your posture in the day. Make sure you've got a good pillow and your spine is aligned at night.
Final thoughts, STRETCH. STRETCHY STRETCH. STRETCH IT. STRETCH IT REAL GOOD. Nothing is going to make it harder to break out of that bad posture than tight, inflexible muscle holding you in place. Pec minor and your hip flexors are common problem areas people should check on.
I'd have to do a posture evaluation to be sure of what's going on, but I can offer some general tips geared towards that.
First, make sure your jaw isn't clenching. People do this without realizing all the time, especially among teeth grinders.
Your shoulders aren't earrings! On top of just being aware of how high you're holding them.
As for stretches, neck and shoulder rolls are criminally underrated for posture related stuff because people half-ass it. Go slow, like one rotation per 30 seconds max. Make sure you're pushing the joints to their maximum in any given direction and REALLY sink that stretch in.
Being aware of what you do in a day where your posture can be improved does more than any exercise or stretch though, seriously. Make sure where you're spending plenty of time, be that your chairs, bed, on your feet, just make sure you're doing things to take corrective action that will stick. An example for this would be a lumbar pillow in a desk chair because you tend to slouch and curve your spine forward.