I can only speak specifically about British desertions, as that is where I've done some research, but I can shed some light in this direction.
There are essentially two definitions of 'desertion' - there is the act itself, which is the departure from a post or duty without intention to return (as opposed to the lesser charges Absent Without Leave or Unauthorised Absence), and the actual charge you would be tried for by court martial. In the thick of the First World War, this would usually consist of three senior officers hearing the case, called a Field General Court Martial. So, to answer the initial question, if you were in charge of a company or battalion or other formation, you could certainly suspect one of your men of having 'deserted', but it was ultimately for a court martial to decide.
In terms of sentencing, 346 British and Commonwealth soldiers were executed at dawn after being convicted of capital offenses, and 266 of those were for desertion, so they were the overwhelming majority of cases that ended in death: by comparison, only 37 were charged and executed for the crime of murder (these and mutineers are the two crimes that have NOT been pardoned in later years, for obvious reasons).
However, these numbers can be misleading, as some 20,000 men were tried between 1914 and 1920 and found guilty of capital offenses carrying the death penalty. Of these 3,000 were actually sentenced to death, but as we've seen only about 10% of those were carried out. Most of the rest either received suspended or commuted sentences. One man who was executed was in fact already under two suspended death sentences!
As for 'disappearing', essentially, if you had deserted and hadn't been caught, you were considered "Missing in Action", the same as if you had been killed, captured or wounded and not found. MIA is essentially a placeholder pending further information, and you count as a casualty essentially because you are no longer 'with the colours' and don't count towards the unit's strength.
Sadly, an awful lot of soldiers in the First World War are still considered MIA, mostly because of the absolutely huge amount of high explosives used in trench warfare. We have an image of the First World War consisting of 'going over the top' and machine guns, but the overwhelming majority of casualties were caused by artillery, and frankly, if you were hit dead on, there's not going to be a lot left. Added into that ID tags had only really come into use a few years prior (1912? I think? Going on memory on that one) and were made out of flimsy material that survived a direct artillery shell about as well as the person wearing it. The Menin Gate in Ypres records nearly 55,000 names of people with no known grave killed in the Ypres Salient alone.
Trials and executions of deserters in the First World War are a fascinating topic, and far more complex and difficult than they are made out to be a lot of the time. For instance this Telegraph Article says that the men were shot for 'cowardice'. Strictly speaking, this was in fact a separate charge, and 18 men were indeed shot for the crime of 'cowardice'. However, this decreased as the war went on, partly because Desertion is a much more concrete charge to bring - you have to have actually done something to be charged with it.
Another point worth making is that at the time there were not many men in the ranks sympathetic to deserters, not least because a man abandoning his post on watch would put other men in the unit in a serious amount of danger. In addition potentially mitigating factors like PTSD were not well understood yet.
Sources:
Corns, Caroline & Hughes-Wilson, John; Blindfold and Alone
Holmes, Richard; Tommy
War Memorial: Shot at Dawn page for the IWM
National Archives page for Courts Martial during World War I