Patch comes from upstream. See https://tex.stackexchange.com/q/651631/2891 .

--- texlive-extra-2022.20220722.orig/texmf-dist/tex/generic/tex4ht/babel.4ht
+++ texlive-extra-2022.20220722/texmf-dist/tex/generic/tex4ht/babel.4ht
@@ -1,6 +1,6 @@
-% babel.4ht (2021-05-16-09:21), generated from tex4ht-4ht.tex
+% babel.4ht (2022-07-24-19:00), generated from tex4ht-4ht.tex
 % Copyright 1999-2009 Eitan M. Gurari
-% Copyright 2009-2021 TeX Users Group
+% Copyright 2009-2022 TeX Users Group
 %
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
@@ -17,7 +17,7 @@
 %
 % If you modify this program, changing the
 % version identification would be appreciated.
-\immediate\write-1{version 2021-05-16-09:21}
+\immediate\write-1{version 2022-07-24-19:00}
 
 
 \def\:tempc#1{%
@@ -29,19 +29,6 @@
   \@safe@activestrue\org@@c:tex[#1]{#2}\@safe@activesfalse}
 \let\@citex\@c:tex
 
-\def\:tempc#1{%
-  \edef\bbl@tempa{\expandafter\@gobble\string#1}%
-  \expandafter\ifx\csname \bbl@tempa\space\endcsname\relax
-    \expandafter\let\csname org@\bbl@tempa\endcsname#1
-    \expandafter\edef\csname\bbl@tempa\endcsname{\noexpand\protect
-      \expandafter\noexpand\csname\bbl@tempa\space\endcsname}%
-  \else
-    \expandafter\let\csname org@\bbl@tempa\expandafter\endcsname
-                    \csname\bbl@tempa\space\endcsname
-  \fi
-  \expandafter\def\csname\bbl@tempa\space\endcsname}
-\:tempc\:ref#1{\@safe@activestrue\org@:ref{#1}\@safe@activesfalse}
-\let\ref\:ref
 
 \def\@newl@bel#1#2{{\:SUBOff\:SUPOff \@safe@activestrue
    \xdef\:temp{\noexpand\n:wlbl{#1}{#2}}}\:temp }
