Okay... ALL kids, at different age junctures... go through attachment to their Mommy and/or Separation Anxiety.
NORMAL.
Separation Anxiety and being "attached" to Mommy, occurs at MANY ages... but is manifested differently, per age.
Your son, is only 2.
He is normal.
Despite how he used to act or not at each venue.
Because... HE is changing and per his age... both cognitively and emotionally. Kids, at this age, their "emotions" are NOT EVEN fully developed.
Now... this has NOTHING TO DO WITH THE FACT that you co-sleep with him or not. Tell, your Husband that.
I used to co-sleep with my kids, and so did ALL OF MY FRIENDS. Both the Mom and/or the Dad. At no time, did this then, "make" their child any more or less, "attached" to Mommy... nor did it impact, their NORMAL developmental phases of "Separation Anxiety."
What your Husband believes, is not true.
2 year olds, OFTEN wake during the night.
Heck I did too, when I was that age and older.
My parents made no big deal of it.
AND also, kids at this age, developmentally, start to have nightmares and general "fear" development... of nighttime or noises at night etc. NORMAL. And it wakes them, too.
It is all developmental based.
It is a phase.
Kids... are attached to MOMMY... AND they also have, Separation-Anxiety too.... and also ALL at the SAME time.
They are young only for a short time.
And one day they won't even want to be near you.