This is not a solution, but an explanation with one not-very-satisfactory workaround and a second hideous one.
The basic problem is not in savetrees
but microtype
. Initially, I assumed it must have to do with word spacing
, but drew a blank. The problem is actually triggered by tracking
. So one workaround is to use savetrees
but disable this particular option.
To see the problem, you can trace tracking
through savetrees
's quite simple code in the documentation. The option is implemented using microtype
, but only if we're producing PDF and LuaTeX is not the engine.
The following is equivalent to loading savetrees
with subtle
and only tracking
enabled.
\documentclass{article}
\usepackage[letterspace=-25]{microtype}
\newcommand \sttest{%
You should use the {\tt mkdir} command to create directories and not use {\tt\textbackslash tt}!\par
You should use the {\ttfamily mkdir} command to create directories and not use {\ttfamily\textbackslash tt}!\par
You should use the \texttt{mkdir} command to create directories and not use \texttt{\textbackslash tt}!\par
You should use the \texttt{mkdir}{} command to create directories and not use \texttt{\textbackslash tt}!\par
}
\begin{document}
\sttest
{\lsstyle
\sttest}
\SetTracking[
spacing={-25*,,},
outer spacing={-25*,,},
outer kerning={0,0},
]{encoding=*}{-25}
{\lsstyle
\sttest}
\end{document}

Workaround 1
Use savetrees
with all options except tracking
.
\documentclass{article}
\usepackage[subtle,tracking=normal]{savetrees}%,tracking=tight
\usepackage{microtype}
\newcommand \sttest{%
You should use the {\tt mkdir} command to create directories and not use {\tt\textbackslash tt}!\par
You should use the {\ttfamily mkdir} command to create directories and not use {\ttfamily\textbackslash tt}!\par
You should use the \texttt{mkdir} command to create directories and not use \texttt{\textbackslash tt}!\par
You should use the \texttt{mkdir}{} command to create directories and not use \texttt{\textbackslash tt}!\par
}
\begin{document}
\parindent=0pt
\sttest
{\lsstyle
\sttest}
\end{document}
Obviously, if you then use letterspacing, you'll get a bizarre result, but presumably you could omit \lsstyle
in your real document. (It is not recommended for general usage, but only for caps/small-caps and in specialist cases.) This will use a little more paper (but be typographically superior, of course).

Workaround 2
If you are really committed to reducing paper, you could enable savetrees
's tracking
locally. I absolutely wouldn't do this (but I don't use savetrees
either). If you nonetheless wish to do so, you can set microtype
up so that letter-spacing emulates savetrees
's tracking
option and use \lsstyle
to enable it locally.
\documentclass{article}
\usepackage[subtle,tracking=normal]{savetrees}
\makeatletter
\usepackage[letterspace=\st@cspace@shrink]{microtype}
\makeatother
\newcommand \sttest{%
You should use the {\tt mkdir} command to create directories and not use {\tt\textbackslash tt}!\par
You should use the {\ttfamily mkdir} command to create directories and not use {\ttfamily\textbackslash tt}!\par
You should use the \texttt{mkdir} command to create directories and not use \texttt{\textbackslash tt}!\par
You should use the \texttt{mkdir}{} command to create directories and not use \texttt{\textbackslash tt}!\par
}
\begin{document}
\parindent=0pt
\sttest
{\lsstyle
\sttest}
\end{document}

But if you're OK with that, I doubt you'd have asked the original question .... So workaround 1 is likely preferable.
lualatex
they look the same.\tt
should not be used anyway (it is not defined by default in latex,article
just defines it for compatibility with latex2.09 documents from the 19980s){\ttfamily mkdir}
gives same space as ` \texttt{mkdir} `savetrees
isn't, to my understanding, intended for typesetting the final version, I'm not sure how concerned you should be about less appealing spacing in this kind of case, but it does seem odd that a package designed to save trees should use more paper.savetrees
only enables the relevant option for pdfLaTeX, since it wasn't supported in LuaLaTeX at the time.