Does your bearded dragon lives in a small tank?
Is there anything that may cause stress in your bearded dragon?
Is the tank temperature the same throughout the whole tank?
Do you feed your bearded dragon regularly?
Do you clean your bearded dragon's tank regularly?
Do you have a female bearded dragon?
If there are insufficient locations for bearded dragons to hide out in their tank, then this could be provoking them to glass surf since bearded dragons like to seek shelter and hide from being in plain sight. Also, being cooped up in a cage for hours on end can take its toll on any creature. Scratching their glass could simply just be an indication that they want out of their tank.
Stress could be the cause of glass surfing. If their tank is placed near a window where they can see the outside or near something that they feel threatened by, then both instances could cause them to feel vulnerable and be the reason for the scratching on their glass tank.
Bearded dragons must be able to go from a hot basking area to a cooler area to properly thermoregulate. Make sure that the basking area is very warm (110 – 115 degrees F) and other parts of their habitat are less than 85 degrees F. If your bearded dragon is frantically scratching the glass, then this could be an indication that they are attempting to seek shelter from the heat.
Scratching the glass could be a sign that your bearded dragon is hungry and he is trying to signal you to feed him.
Bearded dragons like a clean environment and they will not tolerate dirty tank. Often they will glass surf right after they’ve finished pooping to signal to their owner to clean it up.
Not all female bearded dragons will lay eggs, but, if you have a female bearded dragon, this scratching of the glass could be a sign that they are getting ready to lay eggs and is most likely accompanied by digging as well. Typically, this will happen at or around 2 years but could happen as soon as 18 months. If this is the case, then they could potentially lay eggs once a year.
Bearded dragons don’t realize that their reflection is simply their own and instead mistake it for a nearby bearded dragon that they could potentially interact with or feel threatened by. You can help your dragon minimize this scratching behavior by using a good background that wraps around the back and sides of their tank.
https://reptile.guide/bearded-dragon-glass-surfing/

Sreten null
Hi! I’m Sreten Filipović. I graduated from the Faculty of Agriculture at the University of Belgrade, with a master's degree in Environmental Protection in Agricultural Systems. I’ve worked as a researcher at Finland's Natural Resources Institute (LUKE) on a project aimed at adapting south-western Finland to drought episodes. I founded a consulting agency in the field of environment and agriculture to help farmers who want to implement the principles of sustainability on their farms. I’m also a founding member of the nonprofit organization Ecogenesis from Belgrade whose main goal is non-formal education on the environment and ecology. In my spare time, I like to write blog posts about sustainability, the environment, animal farming, horticulture, and plant protection. I’ve also published several science-fiction short stories.
You can find me on LinkedIn at https://www.linkedin.com/in/sreten-filipovi%C4%87-515aa5158/