I get error messages "Missing number, treated as zero" and unwanted spaces before the tcbox'es in math mode (text mode is fine). What am I doing incorrectly? My code is:
\documentclass{article}
\usepackage{amsmath}
\usepackage{tcolorbox}
\renewcommand{\equiv}{\text{\tcbox{=}}}
\begin{document}
$w - 2\equiv v\equiv v$
\strut \newline
\strut \newline
\strut \newline
w - 2\equiv v\equiv v
\end{document}
In overleaf + pdfLaTeX, it yields the following (1st line is where the problem is, 2nd line as expected).
EDIT
I have reduced @Zarko's answer a bit to show what options were used to eliminate the problems:
\usepackage[most]{tcolorbox}
\tcbset{on line,
left=-1pt,right=-1pt,top=1pt,bottom=0pt,
highlight math style={enhanced}}
\renewcommand{\equiv}{\;\tcbhighmath{-->}\;}

