How can I get get rid of the section pages while keeping the section text in the upper right corner?
Removing \section*{Figure A}%
leads to
\documentclass[12pt,landscape,titlepage]{article}%
\usepackage[T1]{fontenc}%
\usepackage[utf8]{inputenc}%
\usepackage{lmodern}%
\usepackage{textcomp}%
\usepackage{lastpage}%
\usepackage[a4paper,left=1cm,right=1cm,top=3cm,bottom=3cm,headheight=3em]{geometry}%
\usepackage{xcolor}%
\usepackage{graphicx}%
\usepackage[english]{babel}%
\usepackage{blindtext}%
\usepackage{xpatch}%
\usepackage{floatrow}%
\usepackage{caption}%
\usepackage{fancyhdr}%
\usepackage{titlesec}%
%
\xpretocmd{\section}{\thispagestyle{plain}}{}{}%
\pagecolor{darkgray}%
\pagecolor{white}%
\color{darkgray}%
\pagestyle{fancy}%
\title{Jane Q}%
\author{Subtitle | 2022}%
\date{}%
\rhead{Jane Q}%
\fancyhf{}%
\fancyhead{}%
\renewcommand{\headrulewidth}{0pt}%
\fancyhead[RO]{{Jane Q}\\\vspace{0.5em}\underline{\leftmark}\\\vspace{0.05em}\rightmark}%
\renewcommand\sectionmark[1]{\markboth{#1}{\mysubtitle}}%
\titleclass{\section}{page}%
\assignpagestyle{\section}{empty}%
\titleformat{\section}[display]{\centering\Huge\bfseries}{\sectionname}{0pt}{\huge}[\clearpage]%
\newcommand{\subtitle}[1]{\gdef\mysubtitle{#1}\ignorespaces}%
%
\begin{document}%
\normalsize%
\maketitle%
\subtitle{2022}%
\section*{Figure A}%
\pagebreak%
\begin{figure}%
\includegraphics[width=\textwidth]{example-image-a}
}%
\end{figure}%
\pagebreak%
\begin{figure}%
\floatbox[{\capbeside\thisfloatsetup{capbesideposition={right,top},capbesidewidth=8cm}}]{figure}[\FBwidth]{\caption*{2022\\10 x 10 cm\\Pencil on paper\\~\\}}{\includegraphics[width=\linewidth,height=\textheight,keepaspectratio]{example-image-a}}%
\end{figure}%
\pagebreak%
\subtitle{2022}%
\section*{Figure B}%
\pagebreak%
\begin{figure}%
\includegraphics[width=\linewidth,height=\textheight,keepaspectratio]{example-image-b}%
\end{figure}%
\pagebreak%
\begin{figure}%
\floatbox[{\capbeside\thisfloatsetup{capbesideposition={right,top},capbesidewidth=8cm}}]{figure}[\FBwidth]{\caption*{2022\\10 x 10 cm\\Pencil on paper\\~\\}}{\includegraphics[width=\linewidth,height=\textheight,keepaspectratio]{example-image-b}}%
\end{figure}%
\pagebreak%
\end{document}