I've seen video of racers that did a lot of side-flopping of the bike when standing and riding uphill. So it must not be too terrible.
I found with a tandem, you can't afford to do that when a second person is seated on the bike..flop it to one side and it doesn't flop back!
So you learn to stand and pedal without flopping the bike around.
If all else fails, try it both ways and see what works best.
__________________
"be careful this rando stuff is addictive and dan's the 'pusher'."