I’m trying to convey this message – Do not try to stand up while you are swinging. In this case, can’t I say “Do not stand up swinging”?
You could say "Do not stand up on the swing", which would include stationary standing as well as standing while swinging.
Let's say, you are sitting on a chair. And now you want to stand up. "Don't stand up swinging" means that you can stand up, but you shouldn't stand up swinging, i.e. moving from side to side.Don't stand up swinging.
You wouldn't put this up as a sign. However, a sign that says "Don't stand up on the swings" would mean "Don't stand on them whether or not you are swinging because a) it could be dangerous and b) you'll make the seat dirty!""Don't stand up on the swing(s) while swinging."?