You can select up to four fields to sort by, with the fields sorting by the order selected. Hold Shift and click on the Due Date (or other column)column.
If you prefer using keyboard shortcuts, add fields to the sort dialog by holding Shift and clicking on the field name. As you've noticed, if you try sorting by Due Date or click the Due Date button in Arrangement, you lose the Category grouping, but by editing the view you can make it do exactly what you want. Is there a way to sort by Due Date within the category? I have several categories of tasks and use the Categories arrangement but I find that my tasks are sorted in a random way.