Your bearded dragon might look like it is scratching stuff when it is actually digging to hide, cool off, or nest. It may also be “glass surfing” and is trying to escape its tank or is frantic because of seeing its reflection on the glass, thinking it’s another bearded dragon.