Consider the following example:
% lualatex test.tex
\DocumentMetadata{}
\documentclass[a4paper]{article}
\usepackage{polyglossia}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\centering
\includegraphics[width = 0.99\textwidth]{example-image-a}
\caption{Test caption.}
\end{figure}
\begin{figure}
\centering
\includegraphics[width = \textwidth]{example-image-a}
\caption{Test caption.}
\end{figure}
\end{document}
As can be seen in the output, the space between the second picture and the corresponding caption is too wide. However, if I remove the polyglossia package, the spacing is correct.
What on Earth is going on and how do I fix it?
Note: I think that this is a somewhat new thing (but I'm not sure); I can't remember ever seeing this before.
Update
A version of the package with a bugfix has now been released; see here.
