There appears to be a secondary sort parameter in v4 that was not there in v2. I sort by position:
v2.x: sorts products by pos, then by product_id
v4.x: sorts by pos, then by something unknown... and the order changes depending on how many products I show in the grid, eg if I show 48 products instead of 12 they will be in a different order.
What is the secondary sorting in v4? Why does the order change? Any idea how to get it to work like 2.x and go back to using the product_id?