Some of the reaction may be from being in a different environment. There will be lots of stimulus it's not used to as well as being in a much smaller enclosure. Don't put a reptile in a glass tank in direct sun inside or out. The glass magnifies the heat and the reptile can over heat. Also, according to my vet, most glass has lead in it which blocks the UV rays. There is no substitute for natural sunlight and basking lizards should get as much as possible, but maybe try a mesh enclosure instead of glass or a harness and leash. A lot of pet stores carry ones made especially for reptiles and I know a couple of people that use them for their bearded dragons and one that uses one for his monitor. It may fight it at first but should get used to it. Hope this helps.
Life is uncertain, eat dessert first