$-style inline math with array without linebreaks doesn't render

Another one from my survey:

MWE:

$\begin{pmatrix}a & b\\ c & d\end{pmatrix}$

Output:


$\begin{pmatrix}a & b\ c & d\end{pmatrix}$


Screenshot (Nov 2023): screenshot_2023-11-16-183800

Backticked math for comparison:

\begin{pmatrix}a & b\\ c & d\end{pmatrix}