One thing I will add that is obviously related to this topic, but doesnt apply directly to the rant on bar options I just posted above ^...
- I dont like weight to be high up or way out in front. Personal preference and everyone is different, but I like my weight to be as low as possible and as close to the frame/steerer as possible. I find it gives me a more stable and consistent feel when riding.
Pushing a handlebar bag out further towards the front of the wheel makes it both high up and way out in front. If you dont mind that, then cool.
If you have an Ortlieb 6+, as mentioned, that thing only holds 5 or 6.5 liters of gear.
There are a ton of other handlebar options in that size that should easily fit within 40cm bars. Like really countless- the handlebar bag market is simply absurd at this point with anyone that has brand trying to get a piece of it. And a whole lot that mount lower and closer to the steerer, if that is appealing.
A couple options out of thousands are below.
Some other options if the Ortlieb really doesnt fit-
Swift Paloma 6liter and 26cm wide.
Swift Catalyst 7.5l and 27cm wide body.