I think I have the same issue.
In my case, SharePoint list was created with each item having 5 columns, and the first column is a sequential ID number. I developed the app with a small data set (items 131-137), and Last(SharePointList).Column1 would return 137. Since then, to complete the data table, I added previous data in reverse order (131 down to 100), and sorted the list in SharePoint, low to high. My aim is to have the app automatically increment Column 1 when adding a new item.
In the editing environment, Last(SharePointList).Column1 still returns 137, the biggest number. When uploaded and pubished to Teams, Last(SharePointList).Column1 returns 100. I'm not sure what the disconnect is.
The editing environment tells me that Sort and SortByColumn are not supported for SharePoint lists.
Any way to get the Teams installation of the app to see the sort used on the Sharepoint List?