Standing up in the golf swing can be an issue for many beginner or intermediate golfers. Usually, the root cause of standing up in the swing is the knees straightening. That's why it helps to try and maintain the knee flex during the backswing, downswing, and until the club is about hip height in the follow through. You actually do want to stand up in the swing, but not until about halfway into the follow through.
In the backswing it's helpful to focus on the right knee staying flexed. Try making practice swings to the top of the backswing and stopping. Check your right knee to see if it's still flexed. It should be bent or flexed about the same amount it was in the setup position. Swinging to the top of the backswing and checking this will help give you the feeling and the feedback if you are doing it correctly or not.
On the downswing and through impact both knees should remain flexed. The focus is more on the left knee staying flexed through impact and in the beginning of the follow through. Once the club is about hip height or parallel with the ground, then both knees should straighten as you stand up to finish the follow through.
Sometimes trying to stay down too long can make it awkward to follow through. One of the most important fundamentals I teach is to stay level and maintain your posture and angles as you swing and turn. Staying the same height especially through impact simplifies your swing so it's easier to be consistent.