Hi,
I have my 8" mali, with another, in a 4.5foot long cage, but I would say a 40gal breeder (3ft long) is enough room for one uro. They are used to running, it's in their nature. Any animal will try to get out of a cage. Try to place decorations against the glass, and maybe cover some of the sides with a background, or just cardboard. I have a wooden cage with a glass front, and they only scratch at the glass front (yes, they still do it in a 4.5 ft cage). I'd just suggest getting the largest cage you have room for, or can afford. Building your own is alot cheaper (cost me nothing since I had all the materials), but 40 gal breeder tanks aren't too expensive, i think around $80. Not much else you can do except take him out to run, and give him some attention, when he is "dancing" 
-----
~Sarah
1.1 Mali Uromastyx (Draco and Pumpkin)
1.0 Russian Tortoise (Pookie)
8.11.22 Millipedes (9 different species)