experts, I am still confused about all of this math in section titles. I read one can use math in section titles these days without having to use \cprotect. Then why when I add unicode-math package, it gives error, and when I remove it the error goes away? I only use lualatex. Here is MWE
\documentclass{article}
\usepackage{unicode-math}
\usepackage{amsmath,mleftright}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\section{$\cos\left( A+B\right) $ and $\sin\left( A+B\right) $}%
test