Hello Jagman,
Do you happen to have the program
Fences installed? A post at the link below said that uninstalling it restored "Sort by" to the conext menu.
"Sort by" doesn't show up in desktop context menu
Is "Sort by" missing just on the desktop context menu, or all opened folder context menus as well?
I'll do some more digging as well in the mean time.
Hope this helps for now,

Shawn