Unfortunately, merchants' inventories' physical layout is not determined programmatically. The merchants are given an inventory and the Neverwinter engine fits them into the provided space as best it can.
This means, I'm sorry to say, that nothing can be done about this.