There seem to be two problems here. The first is that you can't have command names that include digits, so \glsentryunit2 actually means \glsentryunit followed by 2. (This is why there are commands, such as \glsentryuseri, that contain Roman numerals instead of digits.)
Your first \glsaddkey command defines \glsentryunit, and your second \glsaddkey attempts to define \glsentryunit but that command has already been defined, so you get an error. To get around this, you need to find another name, for example \glsentryunitII:
\documentclass{article}
\usepackage{siunitx}
\sisetup{per-mode=symbol}
\usepackage[symbols,xindy]{glossaries-extra}
% add unit
\glsaddkey
{unit}
{}
{\glsentryunit}
{\Glsentryunit}
{\glsunit}
{\Glsunit}
{\GLSunit}
\glssetnoexpandfield{unit}
% add unit
\glsaddkey
{unit2}
{}
{\glsentryunitII}
{\GlsentryunitII}
{\glsunitII}
{\GlsunitII}
{\GLSunitII}
\glssetnoexpandfield{unit2}
\makeglossaries
\glsxtrnewsymbol[%
description=power,%
unit=\si{\W},%
unit2=\si{\J\per\s}
]{P}{P}
\begin{document}
\glsunit{P}, \glsunitII{P}\\
\SIrange{0.5}{2}{\glsunit{P}}\\
\SIrange{0.5}{2}{\glsunitII{P}}
\end{document}
The second problem is that
\SIrange{0.5}{2}{\glsunitII{P}}
doesn't work, but neither does
\SIrange{0.5}{2}{\si{\J\per\s}}
It needs to be
\SIrange{0.5}{2}{\J\per\s}
I recommend removing the \si part from the definition and providing convenient commands that add it where needed. For example:
\documentclass{article}
\usepackage{siunitx}
\sisetup{per-mode=symbol}
\usepackage[symbols,xindy]{glossaries-extra}
% add unit
\glsaddkey
{unit}
{}
{\glsentryunit}
{\Glsentryunit}
{\glsunit}
{\Glsunit}
{\GLSunit}
\glssetnoexpandfield{unit}
% add unit
\glsaddkey
{unit2}
{}
{\glsentryunitII}
{\GlsentryunitII}
{\glsunitII}
{\GlsunitII}
{\GLSunitII}
\glssetnoexpandfield{unit2}
\makeglossaries
\glsxtrnewsymbol[%
description=power,%
unit=\W,%
unit2=\J\per\s
]{P}{P}
\newcommand{\sigls}[2][]{\glsdisp[#1]{#2}{\si{\glsentryunit{#2}}}}
\newcommand{\siglsII}[2][]{\glsdisp[#1]{#2}{\si{\glsentryunitII{#2}}}}
\begin{document}
\sigls{P}, \siglsII{P}
\SIrange{0.5}{2}{\glsentryunit{P}}
\SIrange{0.5}{2}{\glsentryunitII{P}}
\end{document}

Edit:
In the above, the range doesn't index the entry. If you want it indexed, you can add \glsadd. Convenient commands:
\newcommand*{\siglsrange}[4][]{\SIrange[#1]{#2}{#3}{\glsentryunit{#4}}\glsadd{#4}}
\newcommand*{\siglsrangeII}[4][]{\SIrange[#1]{#2}{#3}{\glsentryunitII{#4}}\glsadd{#4}}
Usage:
\siglsrange{0.5}{2}{P}
\siglsrangeII{0.5}{2}{P}