There are so many reasons why you might feel squirrley during out-of-saddle climbs. I think your wheel size is definitely one thing. Another is your position on the bike - are you keeping your weight to the rear or are you hunched over your front wheel? The knobby tire bike will always feel more stable regardless of handlebar width. Also, the geometry of the bike might have been such that you kept your weight to the rear. Your top tube might be too short, which would also make you ride with your weight over your front wheel.
Is your bike mechanically OK? I had a bad headset on my old Trek and that bike was squirrlier than my ex-husband.
![]()
Wider handlebars will slightly compromise your aerodynamics. Watch your wrist action - can you keep them straight on the wider handlebar?