This code don't work on texlive-2021 or on Miktex (MiKTeX 21.8), with pdflatex : the auxilliary complation fail.
\documentclass{article}
\usepackage{pstricks}
%\usepackage[cleanup={},pspdf={-dALLOWPSTRANSPARENCY -dNOSAFER}]{auto-pst-pdf}%
\usepackage{auto-pst-pdf}
\usepackage{hyperref}
\begin{document}
Some text
\begin{pspicture}(0,0)(5,5)
\psline(0,0)(5,5)
\end{pspicture}
Other text
\end{document}