\documentclass{article}
\usepackage[bidi=basic]{babel}
\babelprovide[main,import]{hebrew}
\babelfont{rm}{FreeSans}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
; %or some other punctuation like . or !
\end{tikzpicture}
\end{document}
gives
warning (hpack filter): error: ...e/2022/texmf-dist/tex/generic/babel/babel-bid
i-basic.lua:345: attempt to index a nil value (field '?')
.
\endpgfpicture ...globally \endgroup \hss \egroup
\pgf@restore@layerlist@fro...
l.151 \end{tikzpicture}
A char like a works fine (and gives the expected Missing character: There is no a (U+0061) in font nullfont! message).
As reported here https://tex.stackexchange.com/q/665471/2388, stray punctuation chars in a tikz picture lead to lua errors if bidi is used:
gives
A char like
a
works fine (and gives the expectedMissing character: There is no a (U+0061) in font nullfont!
message).