For the absolute best sound the woofer should be as close to the plane of the soundbar as possible. One or two meters to the side should still render acceptable sound. Further than that and you have an issue with a portion of the mid to upper bass is coming from one location and the midrange and treble are coming from a second location. Depending on the size of the room, you may never notice.
Yamaha used to offer the option to reverse the phase of the woofer in the event that it was either out of plane with the tweeter or too far away. I tested a 2200 two years ago but for the life of me, don't remember whether that is still an option or not.
One thing for sure, out of the cabinet will definitely be better.