Edit: For clarification, there are descriptions and paintings dating back to ancient antiquity depicting leaders of countries actually fighting alongside their troops. Ramses II during the battle of Kadesh, both Louis IX (7th crusade) and Louis VII (2nd crusade) fought, as well as King Richard and Phillippe II of France. There are accounts of them not only taking part in the strategy, but often these men fighting alongside their troops.
At what point did this pattern stop and who were the last examples of this trend?
Martin van Creveld offers an account of this (from a rather eurocentric perspective) on pages 119-121 of Rise and Decline of the State. One of his central theses is that feudal monarchies, having broken the power of the church and nobility by the 1500s, found themselves in need of administrators. To address this need they created bureaucracies, which eventually outgrew the monarchies which created them and developed into impersonal states. The transition from "rulers leading from the front" and "rulers running wars bureaucratically, from a distance" corresponds with this process - as the bureaucratic apparatus grew and become more efficient, the function of rulers became "bureaucrat in chief" and then figurehead, and the various ministries of war and professional armies became quite capable of functioning loyally without direct royal supervision.
van Creveld notes that one of the last European rulers to fight personally and die in combat was Gustavus Adolphus of Sweden at the Battle of Lutzen in 1632; his descendant Charles XII led troops during the Great Northern War of 1700-1706 but reportedly commanded from the rear, as did Prussia's Frederick II during the 18th century. After this van Creveld reports only Napoleon Bonaparte as commanding directly, noting that the other two emperors present at the Battle of Austerlitz in 1805, "Russia’s Alexander and Austria’s Francis I, acted as hangers-on and did little but put obstacles in front of their own subordinates". So by van Creveld's lights, it looks like personal command was unusual in Europe by the mid-1600s, and essentially extinct by 1800.