I can suggest an alternative.
instead of choosing the data source type association, you can choose a microflow
then retrieving data from the database where the XPath equals the association (id) equal the object you passed
and do the sorting as you like
This is normal for Mendix, I’m not sure I understand the deep technical reasons, except it has to do that association use cached data, where and path will query the database. I suspect the sorting is done in the query statement and since the association is using cached data, there is no way to sort the data.
I find this to be a strange quirk with Mendix as I’m not sure what a good use case for not having the data sorted.
As of yet, I have not found a workaround.