I've had to deal with this issue recently and I came up with a slightly different solution that I've only seen one other person briefly mention here but he didn't really explain the idea behind it.
My goals were to play on my 1920x1080 resolution square pixel monitor and have the image take up the full height, maintain the intended aspect ratio, use the tv scalers but not have the extra rows from aspect=true which look horrible, pixels as sharp as possible but also, more importantly because it really bothers me, NOT have pixels that are different sizes due to non integer scaling which means the pixels have to be slightly blurry and there will be some scaling artifacts but for me they were much less noticeable, at least for games with 320x200 resolution.
Because I could not get DosBOX to scale to full height after using the tv scaler, the only solution I could come up with was to create a custom resolution that is a wider aspect ratio than than my monitor so that when it is rescaled by either the monitor's circuitry or the graphics driver it will be the correct 4:3 aspect ratio with pillar boxing.
To calculate the resolution isn't too difficult.
Height = height of dos game * integer scaler you are using (2x/3x)
Width = aspect ratio of your monitor / aspect ratio of dos game resolution / aspect ratio of non-square pixels * width of dos game * integer scaler
So in my case it would be:
Height = 200 * 3 = 600
Width = (16/9) / (8/5) / (5/6) * 320 * 3 = 1280
I only have nVidia hardware so I'm only familiar with their drivers but I assume it's similar with AMD and Intel. If you choose to have the graphics driver perform the scaling you need to remember to set the scaling to Full-screen. I prefer to leave it on Aspect ratio for other reasons however so I opted to have the monitor scale it instead so I don't have to change any settings. To do this you could change the scale setting in the driver from GPU to Display but again this is something I would have to remember to do every time I want to play. However, when you are creating your custom resolution you will notice that the timing values are for your native resolution. If you change the timing standard dropdown from automatic to one of the other options it will recalculate the "correct" timings for you and your custom resolution will always be scaled by the display (if it is capable of scaling your custom resolution) no matter what scaling settings you have set in the driver.
In the dosbox.conf file (it's a good idea to have one for each game) the relevant settings are:
[sdl]
fullscreen=true
fullresolution=1280x600
output= You can actually put anything you want here, even surface. The scaling isn't done by DosBOX.
[render]
aspect=false
scaler=tv3x (or any scaler you prefer, you will have to calculate a different resolution for x2 scalers)
In the game Descent 2 it allows you to change the resolution from in-game and I guess this works different in DosBOX or something because I had to put "scaler=tv2x forced" in the conf file, there may be other games that need this as well.
Of course because aspect=false DosBOX, screenshots/videos will still be square pixels so you will have to scale them in your image/video editor of choice so this doesn't really solve the op's issue but I still think it's relevant if you are actually playing the games.