Escaped percent sign is syntax-highlighted as comment by listings package

you can try to setup the \% as a string:

\documentclass{article}
\usepackage{listings}
\usepackage{xcolor}
\lstset{
    language=[latex]tex,
    basicstyle=\ttfamily,
    commentstyle=\color{violet},
    columns=fullflexible,
    keepspaces=true,
    upquote=true,
    showstringspaces=false,
    morestring=[s]\\\%,
    stringstyle=\color{red},
}
\begin{document}
\begin{lstlisting}
Foo % Comment 1
Bar % Comment 2
Baz \%abc\% Not a comment %still a comment
\end{lstlisting}
\end{document}

enter image description here