It is known that Latin Modern Math does not have a standalone bold font. If you load Latin Modern Math with package unicode-math, and try to use \boldmath, the fontshape with be substituted with the regular font. A minimum working example comparing \boldmath to the unicode-math commands \symbfit & \symbfup, which output bold Latin Modern Math as desired, is as follows:
\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Latin Modern Math}
\begin{document}
{\boldmath $a~A~\omega~\Omega$} \par
$\symbfit{a~A~\omega}~\symbfup{\Omega}$
\end{document}

The compiler reports:

The bold Latin Modern Math glyphs come from the Unicode block Mathematical Alphanumeric Symbols, as shown below (taken from the unicode-math documentation):

My question is:
Can I redefine \boldmath to make it behave as desired by outputting the bold Unicode characters?
To answer in advance "Why must you use \boldmath?", it is because I have been using \boldmath a lot in my documents before starting to use unicode-math. My main usages are:
- Bold math in section titles, but implemented in such a way that does not interfere with the formatting of Table of Contents.
\documentclass{article}
\makeatletter
\g@addto@macro\bfseries{\boldmath}
\makeatother
\begin{document}
\tableofcontents
\section{Bold math in section titles $a~A~\omega~\Omega$}
\subsection{But regular font in ToC $a~A~\omega~\Omega$}
\end{document}

- Make all characters including operators bold, instead of just the letters.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\boldmath $2\hat{a} + \tilde{b} = \sqrt{\dot{c}}$ \
\unboldmath $2\hat{a} + \tilde{b} = \sqrt{\dot{c}}$
\end{document}

P.S.
- I also plan to to apply the solution to
\bmif possible. - The reason why I started using
unicode-mathis that I want to import some glyphs from other fonts, like integrals from XITS Math,\mathscrfrom STIX Two Math,\mathbbfrom TeX Gyre Termes Math, etc. I can achieve that in some other ways, but I don't want to give upunicode-mathwithout a fight.

