\DocumentMetadata{uncompress,xmp=false,testphase=phase-III}
\documentclass{article}
\usepackage{fontspec}
\setmainfont{texgyreheros}
\begin{document}
a\ b
a\penalty10\ b
\end{document}
The first give three chars
but the second contains a font switch:
/F27 9.96264 Tf
1 0 0 1 148.712 645.28 Tm [<001D>]TJ
/F15 9.96264 Tf
1 0 0 1 154.252 645.28 Tm [<0067>]TJ
/F27 9.96264 Tf
1 0 0 1 157.021 645.28 Tm [<0024>]TJ
ET