Their name changes to Gardiner in certain records.
It's not a change as such, just a variant spelling. Spelling was a very inexact science until into the 20th century. If you are searching on Scotland's People use the wildcard facility - g*rd*n*r should find all variants in one search.
Unfortunately that's where all records for him end, apart from the possible match in 1915 - he practically drops off the face of the earth. I can't find any reliable matches for deaths, marriages or anything via scotlandspeople.com, ancestry.co.uk or findmypast.co.uk.
https://www.rootschat.com/forum/index.php?topic=714261.0 If you can't find it on Scotland's People you are wasting your time looking on any other web site for a death in Scotland.
I don't know if he re-enlisted after 1915 and was killed, or he emigrated or even went to prison.
If he stayed in England/Wales you could look for his death at
https://www.freebmd.org.uk/search - same information as Anc*y and FindMyPast etc because they just mirror it, but I think it's easier to search.
My grandfather's father was his illegitimate son and John only appears on his birth record on scotlandspeople due to some kind of correction/addition, apparently due to the insistence of my great, great grandmother who knew who must have fathered her son.
The insistence of his mother, taken on its own, would have no effect whatsoever on the addition to the birth record.
There are only two circumstances in which a father's name appears on the birth certificate of an illegitimate child.
First, if the father accompanies the mother to the registrar's office when she goes to register the birth, and signs the certificate at the same time as she does.
Second, if a court of law orders an entry in the Register of Corrected Entries. This is usually following an action for paternity in the sheriff court, but there could be other reasons. You might be able to find the court records - the RCE should tell you which court and when, and the case might be indexed at
https://www.scottishindexes.com/contact.aspx It does look to me as if he must have emigrated and/or changed his name.