Often times shedding will make them lethargic, grumpy, and have a loss of appetite. I've never noticed either of mine staying in their hide because of shedding though. Maybe someone else has had other experiences and could reply too.
From reading various posts in the past the three most common reasons I've seen for a beardie staying in the shade / out of the light are:
1- Temperature is too hot b/c they were using a stick on thermometer and it wasn't accurate so the beardie was hiding to get out of the heat.
2- New owner that hasn't experienced brumation yet and asking why their beardie was napping and hiding out during the day and it happens to be winter where they live.
3- Parasites
You said that your set up is correct so that rules out 1, your dragon is too young to brumate so that rules out 2, which leaves reason 3 which is why I was suggesting you have a fecal exam performed.
Hope that helps.