A custom authoryear citation in a numeric bibliography is not working

I am using natbib package with IEEE citation style. The citation is mainly numeric but I would also like to mention author, year, and reference number (because the style is actually numeric with only one bibliography). For this, I use the following command

\newcommand{\citeauyear}[1]{%
\citeauthor{#1}~[\citeyear{#1}] [Ref. \citenum{#1}]}


Which is a modified version of the answer in Switching between numeric and authoryear in Natbib. The command above works well with plainnat bibliography style but provides unidentified author and year when used with IEEEtran

\begin{filecontents*}{sample.bib}
@article{aldaoudeyeh2016,
title={{Photovoltaic-battery scheme to enhance PV array characteristics in partial shading conditions}},
author={Aldaoudeyeh, Al-Motasem I},
journal={IET Renewable Power Generation},
volume={10},
number={1},
pages={108--115},
year={2016},
publisher={IET}
}
@ARTICLE{wu2017,
title={{Assessing Impact of Renewable Energy Integration on System Strength Using Site-Dependent Short Circuit Ratio}},
author={Wu, Di and Li, Gangan and Javadi, Milad and Malyscheff, Alexander M and Hong, Mingguo and Jiang, John Ning},
journal={IEEE Transactions on Sustainable Energy},
year={2017},
publisher={IEEE}
}
@article{wu2019,
title={A method to identify weak points of interconnection of renewable energy resources},
author={Wu, Di and Aldaoudeyeh, Al Motasem and Javadi, Milad and Ma, Feng and Tan, Jin and Jiang, John N and others},
journal={International Journal of Electrical Power \& Energy Systems},
volume={110},
pages={72--82},
year={2019},
publisher={Elsevier}
}
\end{filecontents*}

\documentclass[]{book}

\usepackage[x11names, svgnames]{xcolor}

\usepackage[square, nonamebreak, sort&compress, comma, numbers]{natbib} % For IEEE

\newcommand{\citeauyear}[1]{%
\citeauthor{#1}~[\citeyear{#1}] [Ref. \citenum{#1}]}

\usepackage{hyperref}
\hypersetup{citecolor=SlateBlue2, citebordercolor=SlateBlue2,

\begin{document}

\citeauyear{wu2017}, \cite{aldaoudeyeh2016,wu2019,wu2017}

\bibliographystyle{IEEEtran}
\bibliography{sample}

\end{document}


One solution is to use IEEEtranN for bibliography style. This type is based on plainnat and is compatible with natbib commands.
The standard IEEE bibliography (i.e., IEEEtran)
The IEEEtranN bibliography style
The two bibliographies are exactly the same but IEEEtranN works with the custom author-year citation.