1) Check on the sorting tab to sort by month was earlier (higher) sorting by the values of the expression.
2) Maybe the name of the months in your calendar differs from the one set in the script settings so that Qlik Sense "does not see" the field of the month as a month.
It's hard to imagine cause without seeing your data.
I have come across this issue myself. I don't know the reason but I do have a solution. You will need to go to the "Sorting" section for your table/chart. Turn off the auto sorting. A drop down menu will appear that will allow you to create the custom sorting for each level in the drill down. Select your 'Month' definition and then click "Sort numerically" and use the drop down menu to set it to "Ascending".
Hope this helps anyone who comes across this thread.