With my machine I move the tool to the workpiece and enter the approximate coordinate in the "touch off" box for each axis.At the completion of the sequence the tool lifts up to the programmed Z clearance height.It might help if you could post a screenshot of the monitor showing the problem as we don't know what version of LinuxCNC you are using or which screenset.
This shows one of my toolpaths and you can see the G54 values.There is a dedicated LinuxCNC forum at https://forum.linuxcnc.org/ .There is a lot of knowledge there but I don't find it the best explained piece of software,which is a great shame because it is very capable.